📅  最后修改于: 2022-03-11 15:01:27.311000             🧑  作者: Mango
function sum(...numbers) {
return numbers.reduce((accumulator, current) => {
return accumulator += current;
});
};
sum(1,2) // 3
sum(1,2,3,4,5) // 15