Use the Rest Parameter with Function Parameters throws error

Tell us what’s happening:
Hello folks!
The console shows this error; Use the Rest Parameter with Function Parameters. But I’m using the rest parameter in the argument of my sum function. Does someone know what is happening?

Your code so far

function sum(...args){
let x =0;
for(let i = 0; i < args.length; i++){
   x = x + args[i];
return x;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0.

Challenge: Use the Rest Parameter with Function Parameters

Link to the challenge:

Hi @edsonibarra
you made a lot more changes than necessary. All that is required here is to change how the args are passed to the function and the removal of the following definition of the const args. The automated test was written to expect the arrow function syntax of the setup code. So to make your code pass, you have to convert it to arrow function syntax, or reset your code and only make the changes mentioned.