CodeNewbie Community

Discussion on: How does `break` work in JavaScript?

ansellmax profile image
Ansell Maximilian • Edited on

It just "breaks" you out of a loop iteration and switch statements. If your code come finds a break statement during a loop iteration, it will skip that iteration and go to the next (based on some condition, for example).