JSFiddle - React, Tailwind, and code Playground

HTML

<table width="100%" border="1" cellspacing="0" cellpadding="0" id="table">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<div id="click">click</div>
<div id="remove">remove</div>

JavaScript

$(document).ready(function(){
$('#click').click(function(){
    $('#table').append('<tr><td>foo add&nbsp;</td></tr>');
})
$('#remove').click(function(){
    $('#table tr:last').remove();
})
})