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