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

Javascript examples for Statement:Quiz

Description

Make while 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 = 5;
while (i < 10) {
    document.getElementById("demo").innerHTML += i + "<br>";
    i++;//from w ww .  ja v a  2  s .  c  o m
}
</script>

</body>
</html>

Related Tutorials