Set loop step to 5 in for loop : For Loop : Statement JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Statement » For Loop »

 

Set loop step to 5 in for loop

















<html>
<head>
<title>Count By Five</title>
<script>
var i = 0;
for (i=5; i <= 100; i += 5){

  alert (i);
}

</script>
</head>

<body>
<h1>Count By Five<br></h1>
</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Statement
» For Loop