Hi can someone help? I'm creating a 2 dimensional Array with a table but its not displaying anything. why this?
var totalRows = new Array(10);
function drawTable() {
var div1 = document.getElementById('div1');
var tbl = document.createElement("table");
// creating rows
for (var i = 0; i < totalRows.length; i++) {
var row = document.createElement("tr");
totalRows[i]=new Array();
// create cells in row
for (var j = 0; j < totalRows.length; j++) {
var cell = document.createElement("td");
totalRows[i][j]=0;
row.appendChild(cell);
}
tbl.appendChild(row);
}
div1.appendChild(tbl);
}