📅  最后修改于: 2022-03-11 15:03:40.808000             🧑  作者: Mango
function addNumbers(num1, num2) {
let sum = 0;
for (const num of arguments) {
sum = sum + num;
}
return sum;
}
const sum = addNumbers(1, 2, 3, 4, 5)
console.log(sum);
//Output: 15