📜  其余运算符 javascript 代码示例

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

代码示例1
function sum(...numbers) {
    return numbers.reduce((accumulator, current) => {
        return accumulator += current;
    });
};
 
sum(1,2) // 3
sum(1,2,3,4,5) // 15