break and continue

Builtins that change a loop's flow: break leaves the loop at once and continue skips to the next turn.

In more detail

Both take an optional number to act on an enclosing loop, as in break 2. Use them sparingly; a clearer loop test is often better.

Related terms

Taught in

References