forked from M3-Academy/challenge-algorithms-v2.0
development #11
@ -1,4 +1,8 @@
|
||||
export function sumEven(value) {
|
||||
// implementar logica aqui
|
||||
|
||||
const numerosPares = value.filter(valor => (valor % 2) == 0)
|
||||
|
||||
return numerosPares.reduce((somatorio, par) => {
|
||||
return somatorio + par
|
||||
}, 0)
|
||||
}
|
Loading…
Reference in New Issue
Block a user