Loop Control Statement in JavaScript

The Break Statement The break statement can be used to jump out of a loop even when the condition is true. The break statement breaks the loop and continues executing all the code after the loop(if any):

OUTPUT

This time though, we want to stop execution of the loop when i become 3. To do so, we are … Read more