📜  减少 javascript acc 成为 numeber insted 数组 - Javascript 代码示例

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

代码示例2
const secondArray = [1, 2, 3].reduce((acc, item) => {
    acc.push(1);

    return acc;
}, []);

console.log(secondArray);