forked from M3-Academy/challenge-algorithms-v2.0
10 lines
173 B
JavaScript
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;
|
|
} |