js if id is equal to the next id in table count code example
Example: javascript select all table rows
const rows = document.querySelectorAll("table > tbody > tr");
// OR
const Allrows = document.querySelectorAll("tr");
const rows = document.querySelectorAll("table > tbody > tr");
// OR
const Allrows = document.querySelectorAll("tr");