Continue with odd numbers : continue « Language Basics « JavaScript DHTML






Continue with odd numbers

 

<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
var x = 0;
while (x < 10) 
{
    x++;
    if (x % 2 != 0)
    {
        continue;
    }
    alert(x);
}

</script>
</head>
<body>

</body>
</html>

   
  








Related examples in the same category

1.Continue in while loop
2.Continue with condition
3.Continue with even numbers