javascript sum array itens code example Example: reduce mdn array.reduce(callback( accumulator, valueNow[, index[, array]] )[, initialValue]))