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

22 lines
361 B
JavaScript

export function sumEven(value) {
// implementar logica aqui
var soma = 0
for (var cont = 0; cont < value.length; cont++) {
if (value[cont] % 2 == 0)
soma = soma + value[cont]
}
return soma
}