forked from M3-Academy/challenge-algorithms-v2.0
6 lines
193 B
JavaScript
6 lines
193 B
JavaScript
export function sumEven(value) {
|
|
// implementar logica aqui
|
|
return value.reduce((somaTotal, numeroAtual) => {
|
|
return numeroAtual % 2 == 0 ? somaTotal + numeroAtual : somaTotal
|
|
},0)
|
|
} |