A Demonstration of a Nested Loop : For : Language Basics JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Language Basics » For »

 

A Demonstration of a Nested Loop




<html>
<head>
  <title>A Demonstration of a Nested Loop</title>
</head><body>
  <script type="text/javascript">
  <!--
    document.write("All x,y coordinates between (0,0) and (9,9):<br>")
   
    for (var x = 0; x < 10; ++x) {
      for (var y = 0; y < 10; ++y) {
        document.write("(" + x + "," + y + "),");
      }
      document.write('<br>');
    }
   
    document.write("<br>After completing the loop, x equals : " + x);
    document.write("<br>After completing the loop, y equals : " + y);
  // -->
  </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