2d array declaration in js code example
Example: js initialize 2d array
let data = [];
for (let row=0; row<rows; row++) {
data.push(new Array(cols).fill('#'));
};
let data = [];
for (let row=0; row<rows; row++) {
data.push(new Array(cols).fill('#'));
};