Use the Rest Operator with Function Parameters - The sum function uses the ... spread operator on the args parameter

Tell us what’s happening:

Whats wrong with my code??? it gives me this error:

“The sum function uses the … spread operator on the args parameter.”

My code so far


const sum = (function() {
  "use strict";
  return function sum(...a) {
    return a.reduce((a, b) => a + b, 0);
  };
})();
console.log(sum(1, 2, 3)); // 6

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/use-the-rest-operator-with-function-parameters

the test is specifically searching for a parameter called args

ah i see… thank you!