IHYPRESS PROGRAMMING
Tutorials and JavaScript programs with code and output for beginners
c programming
HOME | ASP | C | CSS | GNUPLOT | HTML | JAVASCRIPT | PERL | PHP | PYTHON | RUBY | SVG
JavaScript ❯ Counting Loops
<04>
<html><body> <script> //while loop document.write ("<div>"); var i = 1; while (i <= 140){ document.write (i + " "); ++i; } document.write ("</div><div style='margin-top:10px;color:red;'>"); //for loop for (let i = 100; i >= 0; --i) { document.write (i + " "); } document.write ("</div><div style='margin-top:10px;color:blue;'>"); //do-while loop var j = 1; do { document.write ("The number is " + j + "<br>"); ++j; } while (j < 10); document.write ("</div>"); </script> </body></html>
Hergestellt in Deutschland / Made in Germany
COPYRIGHT © 2015-2024 IHY PRESS Frankfurt am Main 60329 Deutschland