var grid = [...Array(width)].map(e => Array(height)); // access via grid[y][x]
var value = 'foo'; // by default var myGrid = [...Array(6)].map(e => Array(6).fill(value));