js empty table code example
Example 1: delete all the rows of table javascript
$("#table_of_items tr").remove();
Example 2: javascript check table not empty
document.getElementById("myTable").rows.length
$("#table_of_items tr").remove();
document.getElementById("myTable").rows.length