JSFiddle - React, Tailwind, and code Playground
HTML
<table border="1">
<tr>
<td>col1</td>
</tr>
<tr>
<td>col2</td>
</tr>
<tr>
<td>col3</td>
</tr>
</table>
JavaScript
var table = document.getElementsByTagName('table')[0],
rows = table.getElementsByTagName('tr'),
text = 'textContent' in document ? 'textContent' : 'innerText';
console.log(text);
for (var i = 0, len = rows.length; i < len; i++){
rows[i].children[0][text] = i + ': ' + rows[i].children[0][text];
}