Merge pull request 'feat(sumEven): funcao feita' (#7) from feature/sumEven into development

Reviewed-on: #7
This commit is contained in:
Nicolly Vieira Santos Costa 2022-10-28 18:05:25 +00:00
commit 638cf3363d

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