break
直近のブロックを抜けます。ラベルが指定されている場合、ラベルの位置に処理を移します。
構文
break ラベル
例文
<html> <head> <title>break</title> </head> <body> <script type="text/javascript"><!-- for (var i=0; i<10; i++) { document.write(i+"<br>"); if (i == 5) break; } // --></script> </body> </html>
関連記事
- with
- while
- var
- try
- throw
- this
- switch
- return
- new
- if
- function
- finally
- else
- do
- delete
- default
- continue
- const
- catch
- case
- Comment / コメント / 注釈
スポンサーリンク