QP School
JavaScript - Continue Statement Example - Printable Version

+- QP School (https://qomplainerzschool.lima-city.de)
+-- Forum: Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=3)
+--- Forum: JavaScript Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=6)
+--- Thread: JavaScript - Continue Statement Example (/showthread.php?tid=4097)



JavaScript - Continue Statement Example - Qomplainerz - 04-04-2023

Code:
let i = 0;
let n = 0;

while(i < 15)
  {
    i++;
    if(i === 3)
      {
        continue;
      }
    n += i;
    document.write("The value of i is " + i + ".<br>");
    document.write("The value of n is " + n + ".<br>");
  }