JavaScript break Statement: A Complete Tutorial with Examples
The break statement in JavaScript is used to exit a loop (or a switch statement) immediately, even if the loop’s condition is not yet false. When the break statement is executed, the control flow jumps out of the loop or…