Using continue in a do-while loop
Continue stops execution of the rest of the code in the block and jumps directly to the next iteration of your loop.
Since you are doing while(false)
there is no next iteration
Check out this jsFiddle: http://jsfiddle.net/YdpJ2/3/
var getFalse = function() {
alert("Called getFalse!");
return false;
};
do {
continue;
alert("Past the continue? That's impossible.");
} while( getFalse() );
It appears to hit the continue, then break out of that iteration to run the check condition. Since the condition is false, it terminates.
continue
does not skip the check while(false)
but simply ignores the rest of the code within the brackets.