Thursday, April 14, 2011

How to use continue statement in Java Script:


<script language="javascript">

i = 0;
n = 0;
while (i < 5)
{
   i++;
   if (i == 3)//3 will not be in output
      continue;
   n += i;
   document.writeln(i+"<br/>");
}

</script>

No comments:

Post a Comment