for (var i = 0; i < 10; i++) { if (i === 3) { break; } text += "The number is " + i + "<br>"; }
How to "jumps out" of a loop in JavaScript using break function
Expert Edited question July 17, 2023
for (var i = 0; i < 10; i++) { if (i === 3) { break; } text += "The number is " + i + "<br>"; }