Make the loop start counting from 5. Count up to (including) 50, and count only every fifth number. - Javascript Statement

Javascript examples for Statement:Quiz

Description

Make the loop start counting from 5. Count up to (including) 50, and count only every fifth number.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

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

<script>
var i;// w ww . j av a2  s  .c  om
for (i = 5; i <= 50; i = i + 5) {
    document.getElementById("demo").innerHTML += i + "<br>";
}
</script>

</body>
</html>

Related Tutorials