Don't know what is wrong here

Don't know what is wrong here
0

#1

Tell us what’s happening:

I don’t know what is wrong with my solution.

Your code so far


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

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.

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


#2

Hey Yojan,
You do not have any problem in your code.
It seems to work fine for me.
What issue do you have while passing the test?


#3

Just the last test doesn’t pass. It says that i havent use the rest operator.


#4

Try refreshing the page or if you are using chrome.
And if you are suing any other browser, try the challenge in chrome.