JavaScript Tutorial/Statement/Break
Break a while statement
<source lang="javascript">
<html> <head> <title>A Simple Page</title> <script language="JavaScript">
</script> </head> <body> </body> </html></source>
Break statement in a if statement
<source lang="javascript">
<html> <head> <title>A Simple Page</title> <script language="JavaScript">
</script> </head> <body> </body> </html></source>
break statement syntax
The keyword break exits out of loop structures and switch statement.
When a label is used, JavaScript completely breaks out of the area designated by label.
To label a statement, place the label name followed by a colon (:).
Labels are useful when working with nested loops.
<source lang="javascript">
<html>
<SCRIPT LANGUAGE="JavaScript"> </SCRIPT>
</html></source>