title: Adding table rows and cells
body: <p>I tried to make the page add rows and five cells to each table, however I'm having some problems. I appended the row first to the table then followed by looping through the and adding five cells to each row, however whenever I ran it in my web browser it produced this:</p>
  
  <p><img src="https://i.stack.imgur.com/BCr17.png" alt="this."></p>
  
  <p>I want the cells to be a child of the table row.</p>
  
  <pre><code>function addRows(ramnt) {
    if(ramnt &gt; 0){
      var cellcount = 5;
      var tccount = 0;
      table.append('&lt;tr&gt;');
      console.log('Appended &lt;tr&gt;');
      while(tccount &lt; cellcount){
          tccount = tccount + 1;
          table.append('&lt;td id="Cell-' + tccount  + '" class="gencell"&gt;&lt;/td&gt;');
      } 
      if (tccount = cellcount){
        table.append('&lt;/tr&gt;');
        ramnt = ramnt - 1;
        addRows(ramnt);
      }
    }
  }
  
  console.log('Working');
  var table = $('Table');
  addRows(5);
  </code></pre>