2022-10-27 15:07:13 +00:00
|
|
|
export function sumEven(value) {
|
|
|
|
// implementar logica aqui
|
2022-10-30 02:31:05 +00:00
|
|
|
return value.reduce((somaTotal, numeroAtual) => {
|
|
|
|
return numeroAtual % 2 == 0 ? somaTotal + numeroAtual : somaTotal
|
|
|
|
},0)
|
2022-10-27 15:07:13 +00:00
|
|
|
}
|