Home >Web Front-end >JS Tutorial >How to use Break and Continue in JavaScript programs
This is about js tutorial-JavaScript Break and Continue usage. There are two statements that can be used in loops: break and continue.
JavaScript break and continue statements
There are two special statements that can be used inside loops: break and continue. The
Break
break command can terminate the execution of the loop and then continue executing the code after the loop (if there is code after the loop).
Example:
The continue command will terminate the current loop and continue from the next value.
Example: