📜  创建没有值的 javascript 数组 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:41.261000             🧑  作者: Mango

代码示例1
// This...
let arr = new Array(arrayLength)

// ...results in the same array as this
let arr = Array(arrayLength)

// This has exactly the same effect
let arr = []
arr.length = arrayLength