title: Javascript inserting data into HTML table
body: <p>This is a rather simple question, I am having problems inserting data from Javascript into an HTML table.</p>
  
  <p>Here is an excerpt of my JavaScript:</p>
  
  <p>UPDATED - I got rid of the two loops and simplified it into one, however there is still a problem..</p>
  
  <pre><code>    for (index = 0; index &lt; enteredStrings.length; index++) {
          output.innerHTML += "&lt;td&gt;" + enteredStrings[index] + "&lt;/td&gt;"
          + "&lt;td&gt;" + enteredStringsTwo[index] + "&lt;/td&gt;";
          nameCounter++;
          total.innerHTML = "Total: " + nameCounter;
      }
  </code></pre>
  
  <p>And here is an except of my HTML page:</p>
  
  <pre><code>&lt;table id="nameTable"&gt;
     &lt;tr&gt;
       &lt;th&gt;First&lt;/th&gt;&lt;th&gt;Last&lt;/th&gt;
     &lt;/tr&gt;
  </code></pre>
  
  <p></p>
  
  <p>Updated Picture:</p>
  
  <p><img src="https://i.stack.imgur.com/cQAU5.jpg" alt="alt text"></p>