JSFiddle - React, Tailwind, and code Playground
HTML
<table id="myTable">
<tr>
<td>
5
</td>
</tr>
<tr>
<td>5
</td>
</tr>
<tr>
<td>
5</td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>foobar</td>
</tr>
<tr>
<td>5</td>
</tr>
</table>
JavaScript
function RowExists(table,columnValue) {
for(var i=0; i < table.rows.length; i++) {
console.log('checking ' + table.rows[i].cells[0].firstChild.nodeValue + ' against value ' + columnValue);
if (table.rows[i].cells[0].firstChild.nodeValue === columnValue) {
console.log('found at index ' + i);
}
}
}
RowExists(document.getElementById('myTable'), '5');