reduca js code example
Example 1: reduce function javascript
array.reduce(function(acumulador, elementoAtual, indexAtual, arrayOriginal), valorInicial)
Example 2: reduce mdn
array.reduce(callback( accumulator, valueNow[, index[, array]] )[, initialValue]))