feat(sumEven): Finaliza algoritmo

This commit is contained in:
William Simão Cavalcante 2022-10-29 07:46:34 -03:00
parent e3124dd467
commit 5f27101ce7

View File

@ -1,4 +1,12 @@
export function sumEven(value) { export function sumEven(value) {
// implementar logica aqui // implementar logica aqui
let soma = 0
for (let i = 0; i < value.length; i++) {
if (value[i] % 2 === 0) {
soma += value[i]
}
}
return soma;
} }