feat: Soluciona o exercício 07 - Sum even

This commit is contained in:
Eleonora Otz de Mendonça Soares 2022-10-28 16:33:50 -03:00
parent 104b003d48
commit 3cdeba11dd

View File

@ -1,4 +1,11 @@
export function sumEven(value) { export function sumEven(value) {
// implementar logica aqui // implementar logica aqui
let sum = 0
for(let i = 0; i < value.length; i++) {
if(value[i] % 2 === 0){
sum += value[i]
}
}
return sum
} }