Maybe this is a dumb question but is there a way to return to the top of a loop?
Example:
for(var i = 0; i < 5; i++) {
if(i == 3)
return;
alert(i);
}
What you'd expect in other languages is that the alert would trigger 4 times like so:
alert(0); alert(1); alert(2); alert(4);
but instead, the function is exited immediately when i is 3. What gives?