Continue statement
The continue statement “jumps over” one iteration in the loop. It breaks iteration in the loop and continues executing the next iteration in the loop.
Example:
Javascript
let content = "" ; let i; for (i = 1; i < 7; i++) { if (i === 4) { continue ; } content += "Geeks" + i + "\n" ; } console.log(content); |
Output
Geeks1 Geeks2 Geeks3 Geeks5 Geeks6