javascript LABEL Description
| label | NN 4 IE 4 ECMA 3 |
|
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. |
|
| Example | |
outerLoop:
for (var i = 0; i <= maxValue1; i++) {
for (var j = 0; j <= maxValue2; j++) {
if (i == magic1 && j == magic2) {
break outerLoop;
}
}
}
|
|
Previous: javascript label_Object Description
1131,Nickname,Homepage or email,Comments here,Add comment
