you are overwriting the parameter with an array containing undeclared variables
do you see anything in the console before running the tests?
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
check the below code:
function sum(…args) {
return args.reduce((a,b) => a+b, 0;);
}
The above code passess all the tests specified but, still says , make sure to use the args parameter as a rest parameter. Which is the last test. You may change the last test, as it gives the error without any reason or the logic behind the test is not true, as you can see in the above code i have used the args parameter as a rest parameter. Try to run the above code.
Please sir make sure to change the last test . It is useless or maybe it is not required anymore as the problem specified really tells us to use the rest parameter.
I am done with the problem, yeah your solution really works but the last test does not tells to use the arrow function, instead it creates confusion as it sends the error message about the rest parameter. So you must change it.
Thank you for helping make FCC better. Bugs can be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.