I have an empty table, and then a javascript code that allows you to populate the table via input. What I want is to put all the information in this table into an array (regardless of the number of rows and columns in the table) so that later you can delete elements in the array and automatically change the table.
HTML
<input type="text" name="nome" id="nomedisciplina">
<button onclick="adicionar()">Adicionar disciplina</button><br>
JAVASCRIPT
function adicionar() {
var table = document.getElementById("myTable");
var row = table.insertRow(0);
var cell1 = row.insertCell(0);
cell1.innerHTML = document.getElementById("nomedisciplina").value;
}