JSFiddle - React, Tailwind, and code Playground

HTML

<table id="myTable" width="100%" style="table-layout: auto; background-color:red" class="listtable">
<thead>
    <tr>
        <th>Col 1</th>
        <th>Col 2</th>
        <th>Col 2</th>
    </tr>
</thead>

<tbody>
    <tr>
        <td>Col 1</td>
        <td>Col 2</td>
        <td>Col 2</td>
    </tr>
    <tr>
        <td>Col 1</td>
        <td>Col 2</td>
        <td>Col 2</td>
    </tr>
</tbody>    
</table>

JavaScript

var table = document.getElementById("myTable");
    
    var th = table.getElementsByTagName("th");
    var thead = table.getElementsByTagName("thead");
    var tbody= table.getElementsByTagName("tbody");
    var tbody_tr= tbody[0].getElementsByTagName("tr");
    var thead_tr = thead[0].getElementsByTagName("tr");
    
    thead_tr[0].removeChild(th[th.length-1]);
    
    var current_td = null;
    for(i = 0; i < tbody_tr.length; i++) {
        current_td = tbody_tr[i].getElementsByTagName("td");
        tbody_tr[i].removeChild(current_td[current_td.length-1]);
    }