Control loop execution with the break and continue statements.
The `break` and `continue` statements provide additional control over the flow within loops and `switch` statements. The `break` statement is used to terminate a loop (`for`, `while`, `do-while`) or a `switch` statement prematurely. When a `break` statement is encountered inside a loop, the loop is immediately exited, and program execution resumes at the next statement following the loop. This is useful for stopping an iteration process when a specific condition is met, such as finding an item in a list or encountering an error. For example, you might loop through an array to find a specific value, and once you find it, there's no need to continue looping, so you can `break`. The `continue` statement, on the other hand, is used to skip the current iteration of a loop and move to the next one. When `continue` is encountered, the rest of the code inside the current loop iteration is skipped, and the loop's control condition is re-evaluated (for `while` and `do-while`) or the update expression is executed (for `for` loops) before the next iteration begins. This is helpful when you want to bypass a specific case within a loop without terminating the entire loop. For instance, you might be processing a list of numbers and want to skip all negative numbers.