Don't use continue.
If you think that continue
is just what you need inside a loop body, it is likely that the entire loop should be rewritten.
Thecontinue
statement jumps to the top of the loop. I have never seen a piece of code that was not improved by refactoring it to remove thecontinue
statement.--Douglas Crockford, JavaScript: the Good Parts p. 111.
What about the break
statement?