Answered
My basic logic is confused: how to compare the row 1 with row2.
I want to compare the contents of row 1 and row 2, and if the contents are same(same row), delete the second row.
It's a bit confusing to use for and if together.
logical disorder.
It always feels like the loop nesting isn't finished.
Or it just starts and ends.
Or it just starts and ends.
for(var i = 0; i < table.columns.cells.length; i++){
if(table.rows[0].cells[i].contents==table.rows[1].cell[i].contents){
table.rows[0].remove();
}
else{
}
}
