JSFiddle - React, Tailwind, and code Playground

HTML

<table id="tableID">
    
    <tr>
        <th>one</th>
        <th>two</th>
    </tr>
    
    <tr>
        <td>1</td>
        <td>2</td>
    </tr>
    
    <tr>
        <td>3</td>
        <td>4</td>
    </tr>
    
    <tr>
        <td>5</td>
        <td>6</td>
    </tr>
    
</table>
<button id="add">add</button>
<button id="clone">Clone</button>

JavaScript

$("#add").on("click", function(){
    $('#tableID tr:last').clone().appendTo('#tableID');
});

$("#clone").on("click", function(){
    $("#tableID tr").each(function(){
        $(this).append("<td>Test</td>");
    });
});