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

14 lines
221 B
JavaScript
Raw Permalink Normal View History

export function sumEven(value) {
// implementar logica aqui
let soma = 0;
2022-11-08 20:25:44 +00:00
let i = 0;
for (i in value) {
if (value[i] % 2 != 0) {
continue;
} else {
soma += value[i];
}
}
return soma;
}