javascript check table not empty

JavaScript
document.getElementById("myTable").rows.length
Source

Also in JavaScript: