Break and Continue
अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!
break;
The break statement "jumps out" of a loop and continues executing the code after the loop
continue;
The continue statement breaks only one iteration in the loop, and continues with the next iteration.
continue example
for (i = 0; i <= 10; i++) { if (i==5) { continue; } document.write(i + "<br/>"); }
Break example
for (i = 0; i<=10; i++){ if (i ==5) { break; } document.write(i + "<br/>"); }