function Add(...theArgs) { let total = 0; for (let arg of theArgs) { total += arg; } return total; } console.log(Add(1, 2, 3,4,5,6,7,8,9,10)); // Expected output: 55 console.log(Add(11,22,33,44,55,66,77,88,99)); // Expected output: 495
function Add(...theArgs) { let total = 0; for (let arg of theArgs) { total += arg; } return total; } console.log(Add(1, 2, 3,4,5,6,7,8,9,10)); // Expected output: 55 console.log(Add(11,22,33,44,55,66,77,88,99)); // Expected output: 495