JS Quiz: Medium: Reduce accumulator initialization edge case

What happens here?

const arr = [];
const total = arr.reduce((sum, n) => sum + n);
console.log(total);
  • 0
  • undefined
  • NaN
  • TypeError
0 voters