JS

JavaScript Code Output Challenge - Array prototype...

7.

What is the output of the following code?

const numbers = [1, 2, 3, 4, 5];
let sum = 0;

numbers.forEach(function(num) {
  sum += num;
});

console.log(sum);

0

10

15

5