Help with rest params

const sum = (function() {

  "use strict";

  return function sum(...args ) {

    return args.reduce((a, b) => a + b, 0);

console.log(sum(1, 2, 3)); // 6

why it is not working ?
the output only like that " Thesumfunction should use parameter on theargsparameter."

I moved your question to its own topic because you were asking a question related to your own code for a challenge and were not answering the OP of the other thread. It is always best to create your own thread for you specific question(s). Also, it is advisable to use the Ask for Help button on the challenge, so it auto-populates with your current code and the challenge url.

Thank you.

you have changed more than acceptable, if you have taken code from somewhere, the challenge was changed since your code was valid

I suggest you reset the code and try again

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.