Javascript Reference
Categories: continue

javascript continue Description

@March 15, 2008, 1:22 a.m.
continueFirefox/Netscape/NN 2 IE 3 ECMA 1

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).

for (var i = 0; i <= maxValue1; i++) {
    for (var j = 0; j <= maxValue2; j++) {
        if (j*i == magic2) {
            continue outerLoop;

Powered by Linode.