Break and Continue
¡Supera tus tareas y exámenes ahora con 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/>"); }