challenge-algorithms-v2.0/07-sumEven/index.js
2022-11-08 18:25:44 -02:00

14 lines
221 B
JavaScript

export function sumEven(value) {
// implementar logica aqui
let soma = 0;
let i = 0;
for (i in value) {
if (value[i] % 2 != 0) {
continue;
} else {
soma += value[i];
}
}
return soma;
}