Catch Unclosed Parentheses, Brackets, Braces and Quotes?

Tell us what’s happening:

Your code so far


let myArray = [1, 2, 3];
let arraySum = myArray.reduce((previous, current =>  previous + current),0);
console.log(`Sum of array values is: ${arraySum}`);

I don’t understand what is happening, i closed all the parenthesis. Is it something in the reduce parameters which i have not put, or in the console line??

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/debugging/catch-unclosed-parentheses-brackets-braces-and-quotes

this…

It looks like what @Dereje1 provided didn’t show.

You misplaced your closing paren. It should be;

let arraySum = myArray.reduce((previous, current) => previous + current);

When you have more than one parameter using arrow syntax, you need to put parameters inside round brackets , if you want the wordly explanation

Oh thanks guys, I just added a closing and opening parenthesis, it worked. If you need an extra brain just send me a message.

Regards