| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Statements/continue | [Back] [Original] |
Get to know MDN better
This feature is well established and works across many devices and browser versions. Its been available across browsers since 20157.
continue whiledo-whileforlabel
continue whiledo-whilefor break continue while for continue label continue
continuecontinue label continue while continue i 3 n 13712
i = 0;
n = 0;
while (i < 5) {
i++;
if (i == 3) continue;
n += i;
}
checkiandj checkj continue checkj continue checkj false false checkiandj checkiandj false false checkiandj
continue checkiandj checkiandj
checkiandj: while (i < 4) {
document.write(i + "<br/>");
i += 1;
checkj: while (j > 4) {
document.write(j + "<br/>");
j -= 1;
if (j % 2 == 0) continue checkj;
document.write(j + " is odd.<br/>");
}
document.write("i = " + i + "<br/>");
document.write("j = " + j + "<br/>");
}
This page was last modified on 2025716 by MDN contributors.
Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |