I don't really need null items. In fact, the copy here with the appray
spread syntax gives undefined, not null items. All I need is items
that map() will actually act on. The initial Array(9) gives only
"empty" items which map() ignores.
game_info: {},
player_info: {},
other_players: [],
game_info: {},
player_info: {},
other_players: [],
- squares: Array(9).fill(null).map(() => Array(9).fill(null)),
+ squares: [...Array(9)].map(() => Array(9).fill(null)),
moves: 0,
next_to_play: "+"
};
moves: 0,
next_to_play: "+"
};