Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.

Instruction

Exit a Loop

In each of the three types of loops you've worked with so far, there's some "exit" condition. In other words, when a specific condition is no longer true, like a counter variable is no longer less than 10, or less than or equal to 100, the loop ends.

for ( let i = 0; i <= 100; i++ ) {
 // code to run
}

But that's not the only way to exit a loop. JavaScript includes a "...