Answers for "js initialize 2d array"

1

js initialize 2d array

let data = [];
for (let row=0; row<rows; row++) {
    data.push(new Array(cols).fill('#'));
};
Posted by: Guest on July-22-2020

Code answers related to "js initialize 2d array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language