ES6 continue
“continue”或“break”语句与其标签名称之间不允许换行。
实例
outerloop: // This is the label name for (var i = 0; i < 3; i++) { console.log("Outerloop: " + i); for (var j = 0; j < 5; j++) { if (j == 3){ continue outerloop; } console.log("Innerloop: " + j ); } }
在成功执行上述代码时,会显示以下输出。
Outerloop: 0 Innerloop: 0 Innerloop: 1 Innerloop: 2 Outerloop: 1 Innerloop: 0 Innerloop: 1 Innerloop: 2 Outerloop: 2 Innerloop: 0 Innerloop: 1 Innerloop: 2
此属性表示两个可表示数字之间的最小间隔。例var interval = Number.EPSILONconsole.log(interval)输出2.220446049250313e-16 ...