title: How do I set the ID of a newly created table Row or cell?
body: <pre><code>var table = document.getElementById("table-body");
  var row = table.insertRow(-1);
  var cell1 = row.insertCell(0);
  var cell2 = row.insertCell(1);
  var cell3 = row.insertCell(2);
  var cell4 = row.insertCell(3);
  cell1.innerHTML = ingredient_name;
  cell2.innerHTML = ingredient_amount;
  cell3.innerHTML = ingredient_unit;
  cell4.innerHTML = '&lt;button type="button" class="close" aria-.hidden="true"onClick="$(this).closest(\'tr\').remove()"&gt;&amp;times;&lt;/button&gt;';   
  </code></pre>
  
  <p>How would I set the ID of a row or a table that I've just created?</p>