JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/dot-luv/jquery-ui.css">
<table id='gridLayout'>
    <tbody>
        <tr><td>current cell</td></tr>
        <tr><td>current cell</td></tr>
        <tr><td>current cell</td></tr>
        <tr><td>current cell</td></tr>
        <tr><td>current cell</td></tr>
    </tbody>
</table>

JavaScript

// Reference index --------------v
$("#gridLayout tr").each(function( idx ) {
       // idx contains the current index number,
       //    without having to call another method

     $(this).append('<td>--new cell ' + idx + '</td>');
});