1、continue
for (var i = 0; i < 3; i++){ if(i == 2) continue; console.log(i); }
如图:
2、break
for (var i = 0; i < 5; i++){ if(i == 3) break; console.log(i); }
如图所示
总结:break完全结束循环,continue终止本次循环