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