QP School

Full Version: JavaScript - Continue Statement Example
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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>");
  }