I currently insert data in the td of the body of my table in this way:
<table id="table1">
<thead>
<tr>
<th>Nombre</th>
<th>Apellido</th>
</tr><!--aca necesito insertar otro th-->
</thead>
<tbody>
<tr>
<td>Jorge</td>
<td>Casas</td>
</tr>
<tr>
<td>Juan</td>
<td>Perez</td>
</tr>
</tbody>
</table>
$('#table1').append('<tr id='+token+'><td>'+variable1+'</td><td >'+variable2+'</td><td>'+variable4+'</td><td><button type="button" onclick="Eliminar()" class="btn btn-warning"> Eliminar </button></td></tr>')
What form could I insert into the th in the thead of my table?
$('#table1 thead').append('<tr><th>Prueba</th></tr>');//estaba probando con esto pero no lo inserta de forma correcta