JS

JavaScript Code Output Challenge - reduce method j...

18.

What will be the output of the following code?

const numbers = [1, 2, 3, 4, 5];
const sum = numbers.reduce(function(accumulator, currentValue) {  
  return accumulator + currentValue;
}, 0);
console.log(sum);

25

15

10

6