Break a while statement : Break « Statement « JavaScript Tutorial






<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!--
var x = 0;
while (x < 10)
{
    x++;
    document.write(x);
    break;
    document.write("Never seen!");
}
//  -->
</script>
</head>
<body>

</body>
</html>








3.9.Break
3.9.1.break statement syntax
3.9.2.Break a while statement
3.9.3.Break statement in a if statement