Name
continue — NN 2 IE J1 ECMA 1
Synopsis
Stops execution of the current iteration through the loop and returns
to the top of the loop for the next pass (executing the update
expression if one is specified in a for
loop). If
you are using nested loop constructions, assign labels to each nested
layer, and use the desired label as a parameter with the
continue
statement. See the
label
statement (available only starting with
Navigator 4 and Internet Explorer 4).
Syntax
continue [label
]
Example
outerLoop: for (var i = 0; i <= maxValue1; i++) { for (var j = 0; j <= maxValue2; j++) { if (j*i == magic2) { continue outerLoop } } }
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.