title: Creating table using for loop in Javascript
body: <p>I am trying to create a simple times table in a html document using Javascript. This is my code so far:</p>
  
  <pre><code>&lt;!DOCTYPE&gt;
      &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Table&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;script language="javascript" type="text/javascript"&gt;
          for (var a=0; a &lt; 10; a++) {
              document.write("&lt;tr&gt;");
              for(var b=0; b&lt;10; b++) {
                  document.write("&lt;td&gt;"a*b"&lt;/td&gt;");
          }
          document.write("&lt;/tr&gt;");
          }
      &lt;/script&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>I looked through the posted questions, but could not find an answer, possibly because I am a beginner programmer and did not understand most of it.</p>