statement is similar to the
Instead of exiting a loop, however,
restarts a loop in a new iteration. The
statement’s syntax is just as simple as the
statement can also be used with a label:
in both its labeled and unlabeled forms, can be used only within the
body of a
for/in loop. Using it
anywhere else causes a syntax error.
continue statement is executed, the
current iteration of the enclosing loop is terminated and the next
iteration begins. This means different things for different types of
whileloop, the specified
expressionat the beginning of the loop is tested again, and if it’s
true, the loop body is executed starting from the top.
continuestatement to jump directly to the top of a
do/whileloop without testing the loop condition. Therefore, if you plan to use a
continuestatement in a loop, you should avoid the
do/whileloop. This is not a serious problem, however, because you can always replace a
do/whileloop with an equivalent
incrementexpression is evaluated and the
testexpression is tested again to ...