Introduction
The break statement stops a loop or switch immediately. It helps you exit early when you find what you need or want to stop repeating.
When searching a list and you find the item you want, stop checking the rest.
When reading user input in a loop and the user types 'exit', stop the loop.
When processing options in a switch and you want to stop after one case runs.
When you want to avoid unnecessary work after a condition is met inside a loop.