Understanding JavaScript break Statement
The break statement in JavaScript is used to terminate the current loop, switch, or label statement. When the break statement is encountered, the program flow immediately exits from the loop or switch, and execution continues with the next statement following [...]