构造指定长度数组,并为每个元素设置为 undefine(可作为临时数组供遍历使用) 代码如下 let b = Array.apply(null, Array(2)) let c = Array(...Array(3)) let d = [...Array(4)] let e = Array.apply(null, { length: 5 }) let f = Array(6).fill(undefined) let g = Array.from(Array(7))