Answers for "javscript generate empty 2d array"

1

javscript generate empty 2d array

var grid = [...Array(width)].map(e => Array(height));
// access via grid[y][x]
Posted by: Guest on March-02-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language