JavaScript Continue Statement

The JavaScript Continue statement will continue the next iteration, and that will not execute next line of code.

JavaScript Continue Statement Example:

var sum=0;
for (i=0;i<=5;i++)
 {
    if (i==3) continue;
      sum =sum + i; // this line of code will execute if  i != 3
  }
alert(sum);

Live Demo of JavaScript Continue Statement

Leave a Reply