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

11 lines
189 B
JavaScript
Raw Normal View History

export function sumEven(value) {
// implementar logica aqui
2022-10-30 17:44:32 +00:00
let sum = 0;
for (let number of value) {
if(number % 2 === 0) {
sum += number;
}
}
return sum;
}