码云 前端开发 JavaScript中如何用初始值填充数组? 1. 用 primitives 填充数组 假设我们想用给定值初始化一个长度为 3 的... Array.fill() Array.from() array.map() map