Explore 100's Of Free Video Tutorials

Keep Learning, Keep Coding & Keep Sharing

Javascript continue statement - Part I

Notes:

Javascript continue statement: It continues the loop

Browser skips statement(s) under the continue statement, and transfers the control
to the condition part of the loop in the context of while and do while loops
where as in the context of for loop, control is transferred to increment / decrement part.
Continue statement is used only inside loops.

Syntax:
continue;

Ex: Continue inside for loop
for(var i=1; i<=5; i++)
{
if(i==3)
{
continue;
}
document.write(i,"<br/>");
}

Interview Questions: