A for Loop Used to Count from 0 to 99 : For : Language Basics JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Language Basics » For »

 

A for Loop Used to Count from 0 to 99



<html>
<head>
<title>A for Loop Used to Count from to 99</title>
<body>
  <script type="text/javascript">
  <!--
    document.write("Numbers 0 through 99:");
    document.write('<hr size="0" width="50%" align="left">');
   
    for (var i = 0; i < 100; ++i) {
      if(i%10 == 0) {
        document.write('<br>');
      }
      document.write(i + ",");
    }
    document.write("<br><br>After completing the loop, i equals : " + i);
  // -->
  </script>
</body>
</html>


           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Language Basics
» For