JSFiddle - React, Tailwind, and code Playground

HTML

<button id="button">ChangeLastWord</button>
<div id="tableWrapper">    
    <table id="myTable" class="fit">
      <tr>
        <td>some</td>
        <td>nice</td> 
        <td>word</td>
      </tr>
      <tr>
        <td>some</td>
        <td>nice</td> 
        <td>word</td>
      </tr>
    </table>
</div>

CSS

table {
  width: 100%;
}

td {
    text-align: center; 
    vertical-align: middle;
    white-space: nowrap; 
}

.fit {
    white-space: nowrap;
    width: 1%;   
}

JavaScript

$('#button').click(ChagneLastWord);

function ChagneLastWord() {
	var lastCell = $("#myTable tr").first().find("td").last();
  lastCell.text("looooooooooooooooooooooooooooooooooooooong word");
}