I have always believed you use continue as follows:
var i;
for (i = 0; i < 10; i++) {
if(i%2===0) {
continue;
}
}
Or
var i, myloop;
myloop: for (i = 0; i < 10; i++) {
if(i%2===0) {
continue myloop;
}
}
But when I run these two snippets of code through JSLint, I get the error:
Problem at line 5 character 5: Unexpected 'continue'.
continue;
What am I doing wrong? What is the correct usage?
I guess JSLint just hates
continue: