Introduction
The break statement stops a loop or switch early. It helps you exit when you find what you want or need to stop.
When searching for a value in a list and you want to stop once found.
When you want to exit a loop if a certain condition happens.
When you want to stop checking cases in a switch statement after a match.
When you want to avoid unnecessary work inside loops.
When you want to improve program speed by stopping early.