feat(sumEven): funcao feita #7

Merged
NicollyVieira merged 1 commits from feature/sumEven into development 2022-10-28 18:05:25 +00:00

View File

@ -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)
}