停止循环的当前迭代,并开始新的迭代。
continue [label];
可选的 label 参数指定 continue 应用于哪条语句。
只能在 while、do...while、for、或 for...in 循环内使用 continue 语句。执行 continue 语句会停止当前循环的迭代,并从循环的开始处继续程序流程。这样对不同的循环类型有如下影响:
下面示例说明了 continue 语句的用法:
function skip5(){
   var s = "", i=0;
   while (i < 10) 
   {
      i++;
      // 跳过 5
      if (i==5)
      {
       continue;
      }
   s += i;
   }
   return(s);
}
break 语句 | do...while 语句 | for 语句 | for...in 语句 | Labeled 语句 | while 语句