const arr = [1, 2, 3, 4, 5];
const sum = arr.reduce((previousSum, element) => {
const newSum = previousSum + element;
return newSum;
}, 0); // Initially the sum is set to 0
console.log(sum); // 15
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)