Close parenthesis

Tell us what’s happening:

Your code so far


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

The reducer function you’ve written look like this:

(previous, current => previous + current)

Which is the same as

previous, current => previous + current

you could also write the code you’ve written like this:

previous, function (current) {
  return previous + current;
}

Can you see where there is a syntax error? You need to be careful about where you put brackets: arguments need to go inside a pair of brackets