javascript reduce function documentation code example
Example 1: .reduce mdn
arr.reduce(callback( accumulator, currentValue[, index[, array]] )[, initialValue])
Example 2: javascript, reduce
const myReduce = myArray.reduce((acc, item) => {
acc += item
})