Вы также можете использовать querySelector()
пример:
document.querySelector("table").style.display="table";
table {display:none;}
<table>
<tr>
<td>Do you see me ?</td>
</tr>
</table>
или дать правильный идентификатор для таблицы
document.getElementById("table").style.display = "table";
table {
display: none;
}
<table id="table">
<tr>
<td>Do you see me ?</td>
</tr>
</table>