1. Home
  2. Computing & Technology
  3. JavaScript

Continue

By Stephen Chapman, About.com

Definition: The continue statement is used within loops to bypass the rest of the code for the current run through the loop. With while (and do/while) loops it jumps to the spot in the loop where the while statement is evaluated again to see whether to continue around the loop. With for loops it jumps to the spot there the third statement in the for loop definition is run and continues from there. Continue is a reserved word and cannot be used for anything other than bypassing loop processing.
Examples:
if (a == b) continue;
Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.