Debugging: Catch Unclosed Parentheses, Brackets, Braces and Quotes problem

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

I get error: Your code should fix the missing piece of the

.reduce()

method. The console output should show that “Sum of array values is: 6”.

Any ideas?

an hint: if I put this in the browser console this error comes up:

VM58:2 Uncaught ReferenceError: previous is not defined

so you probably needs to look around there for your issue. Maybe check what is the syntax for reduce()

Thank you for the reply.

what this means?

previous, current => previous + current

have you tried checking the documentation?

Thank you for your reply.

I read the documentation and didn’t figure it out. Can you explain to me, what the following means?

Thank you for your reply.