欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

JavaScript Break 和 Continue區(qū)別教程

 更新時間:2007年04月05日 00:00:00   作者:  
有兩種可以用在循環(huán)中的聲明:break和continue。
JavaScript break 和 continue 聲明
有兩種特殊的聲明可用在循環(huán)內部:break和continue。

Break
break命令可以終止循環(huán)的運行,然后繼續(xù)執(zhí)行循環(huán)之后的代碼(如果循環(huán)之后有代碼的話)。
實例:

[Ctrl+A 全選 注:引入外部Js需再刷新一下頁面才能執(zhí)行]

結果:
The number is 0
The number is 1
The number is 2Continue
continue命令會終止當前的循環(huán),然后從下一個值繼續(xù)運行。

實例:

[Ctrl+A 全選 注:引入外部Js需再刷新一下頁面才能執(zhí)行]

結果:
The number is 0
The number is 1
The number is 2
The number is 4
The number is 5
The number is 6
The number is 7
The number is 8
The number is 9
The number is 10

相關文章

最新評論