Why does my function return NaN?

Hello, I have a simple reduce method on my array but for some reason, it just returns NaN instead of calculating the values of each element.
Here’s the code:

let ab = [{
  value: 1111111111,
  value: 100000,
  value: 35453454545,


Turns out I had to add the initial value so the function should look like this

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.