Make the loop start counting from 5 instead of 0 - Javascript Statement

Javascript examples for Statement:Quiz

Description

Make the loop start counting from 5 instead of 0

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p id="demo"></p>

<script>
var i;/*from w  ww  . j  a  va 2s  .  com*/
for (i = 5; i < 10; i++) {
    document.getElementById("demo").innerHTML += i + "<br>";
}
</script>

</body>
</html>

Related Tutorials