July 1998
Intermediate to advanced
1456 pages
65h 5m
English
label — NN 4 IE J3 ECMA n/a
You can assign a label identifier to any block of executing
statements, including control structures. The purpose of the label is
to allow break and continue
statements within deeply nested control structures to exit to a
nested level that may be at levels beyond the scope of the normal
break and continue statements.
labelName:outerLoop:
for (var i = 0; i <= maxValue1; i++) {
for (var j = 0; j <= maxValue2; j++) {
if (i == magic1 && j == magic2) {
break outerLoop
}
}
}Read now
Unlock full access