title: How to display a jQuery and Javascript generated 2 dimensional array in HTML?
body: <p>I am trying to create a table of 100 random numbers, the random numbers are from 0 to 100. I need to display the 100 random numbers as a 10 by 10 matrix in HTML, using JS and jQuery. The code that I have been working on displays the last array 10 times. Here is the code:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;My Web Page&lt;/title&gt;
          &lt;script type = "text/javascript" src = "http://code.jquery.com/jquery-1.8.2.min.js" /&gt;
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;h1 id = "randData"&gt;Randomize Data&lt;/h1&gt;
          &lt;button id = "myRandomizeBtn"&gt;Randomize&lt;/button&gt;
          &lt;p&gt;&lt;/p&gt;
          &lt;p&gt;&lt;/p&gt;
          &lt;p&gt;&lt;/p&gt;
          &lt;p&gt;&lt;/p&gt;
          &lt;p&gt;&lt;/p&gt;
          &lt;p&gt;&lt;/p&gt;
          &lt;p&gt;&lt;/p&gt;
          &lt;p&gt;&lt;/p&gt;
          &lt;p&gt;&lt;/p&gt;
          &lt;p&gt;&lt;/p&gt;
      &lt;/body&gt;
      &lt;script type="text/javascript"&gt;
      $("#myRandomizeBtn").bind("click",randomizeHandler);
      function randomizeHandler(evt)
      {
          var n = 10;
          var data = new Array();
          for (var i = 0; i &lt; n; i++)
          {
              for (var j = 0; j &lt; n; j++)
              {
                  data[i,j] = Math.floor(100*Math.random());
                  $("p").text(data);
              }
              $("br").text(data);
          }
      }
      &lt;/script&gt;
  &lt;/html&gt;
  </code></pre>