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

10 lines
173 B
JavaScript

export function sumEven(value) {
// implementar logica aqui
var total = 0;
for (let i of value) {
if (i % 2 ===0) {
total += i;
}
}
return total;
}