JavaScript - Continue statement: continue
This command is used to start the next iteration. This means that if we execute this command we'll break the loop and continue with the next iteration.continue
Description
continue ;
Note: Usable in the following locations:
loop with condition at the end loop with condition on the beginning
loop with condition at the end loop with condition on the beginning
Examples
JavaScript
Continue statement the possible of use:i=0;
while (i<10) ++i;
x =0;
while (i<20)
{
i= i+2;
if (i==16)
{
continue;
}
x++;
}
Continue statement in another programming language:
Differences to: