Break statement in JavaScript
The JavaScript break statement breaks out or exits the current loop, switch statement, or a labeled block. It is a very useful statement, which helps us to exit the loop midway when a certain condition occurs. The break transfers the control to the very next statement after the loop, switch, or a labeled block.