Javascript examples for Statement:Quiz
Use the continue statement to skip the number 5 in the loop.
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> var text = ""; var i;/*from w w w . jav a2 s . c o m*/ for (i = 1; i < 10; i++) { if (i === 5) continue; document.getElementById("demo").innerHTML += i + "<br>"; } </script> </body> </html>