📅  最后修改于: 2022-03-11 15:01:10.461000             🧑  作者: Mango
// this will create a 2D array of 'none' word
var size = 3;
var myArray = Array(size).fill( Array(size).fill("none") );
console.log(myArray);
/*
[
["none", "none", "none"],
["none", "none", "none"],
["none", "none", "none"]
]
*/