feat(sumEven): funcao feita #7

Merged
NicollyVieira merged 1 commits from feature/sumEven into development 2022-10-28 18:05:25 +00:00
Showing only changes of commit 0618ad9863 - Show all commits

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