How can I delete all rows of an HTML table except the
const table = document.querySelector('table');
table.innerHTML === ' ' ? null : table.innerHTML = ' ';
the above javascript worked fine for me. It checks to see if the table contains any data and then clears everything including the header.\'s using Javascript, and without looping through all the rows in the table? I have a very huge