break / continue
Controlling loop execution.
Examples
Break Example
Stops the loop when i is 3.
for (let i = 0; i < 10; i++) {
if (i === 3) { break; }
console.log("The number is " + i);
}Test Your Knowledge
JavaScript Quiz
No quiz available for this topic yet.