ECMAScript Labelled Statements

Labeled Statements

You can add labels to statements using the following statements to call them later:

label : statement

For example:

start : i = 5;

In this example, the label 'start' can be referenced by subsequent break or continue statements.

Tip:In the following chapters, we will introduce you to the break and continue statements.