1let data = [];
2for (let row=0; row<rows; row++) {
3 data.push(new Array(cols).fill('#'));
4};
1function makeArray(w, h, val) {
2 var arr = [];
3 for(let i = 0; i < h; i++) {
4 arr[i] = [];
5 for(let j = 0; j < w; j++) {
6 arr[i][j] = val;
7 }
8 }
9 return arr;
10}
11