Break and Continue in Loops
Alter loop iterations using break and continue statements.
We'll cover the following...
Background
In this lesson, we will learn about the break and continue statements. These statements make it convenient for us to make alterations to iterations of the loop.
Introduction
In JavaScript loops, you can use statements to either skip an iteration or exit the loop using continue or break statements respectively.
Let’s take a look at each.
Continue statement
The continue statement skips one iteration of the loop and goes onto the next. Any instruction followed by the continue ...
...