challenge-algorithms-v2.0/07-sumEven/index.js

13 lines
208 B
JavaScript

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