Continue in while loop : continue « Language Basics « JavaScript DHTML






Continue in while loop

 
<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
var x = 0;
while (x < 10) 
{
    x++;
    document.write(x+"<BR>");
    continue;
    alert("You never see this!");
}

</script>
</head>
<body>

</body>
</html>

   
  








Related examples in the same category

1.Continue with condition
2.Continue with even numbers
3.Continue with odd numbers