Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js initialize 2d array

let data = [];
for (let row=0; row<rows; row++) {
    data.push(new Array(cols).fill('#'));
};
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #initialize #array
ADD COMMENT
Topic
Name
6+6 =