|
JavaScript : The continue Statement
The continue statement is used to continue the loop and continue executing the code
that follows after the loop (if any).
<html>
<body>
<script type="text/javascript">
var i=0;
for (i=0;i<=5;i++)
{
if (i==3)
{
continue;
}
document.write("Number " + i);
document.write("<br />");
}
</script>
</body>
</html>
The output will be
Number 0
Number 1
Number 2
Number 4
Number 5
The loop will continue after i=3.
|