JSFiddle - React, Tailwind, and code Playground
HTML
<table id="Table">
<tr>
<td id="1">1</td>
</tr>
<tr>
<td id="2">2</td>
</tr>
<tr>
<td id="3">3</td>
</tr>
<tr>
<td id="4">4</td>
</tr>
<tr>
<td id="5">5</td>
</tr>
</table>
JavaScript
$("#Table tr:nth-last-child(2)").css('color','red');