Javscript menghasilkan array 2D kosong
var grid = [...Array(width)].map(e => Array(height));
// access via grid[y][x]
just-saved-you-a-stackoverflow-visit
var grid = [...Array(width)].map(e => Array(height));
// access via grid[y][x]