Tell us what’s happening:
Describe your issue in detail here.
Your code so far
What’s wrong with this code?! Why the console tells it’s not an arrow function???
const sum = (...num) => {
let total = 0;
const args = [...num];
for (let i = 0; i < args.length; i++) {
total += args[i];
}
return total;
}
sum(1, 2, 3);
Your browser information:
User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Mobile Safari/537.36
Challenge Information:
ES6 - Use the Rest Parameter with Function Parameters