feat(sumEven): Implementacao da funcao sumEven()

This commit is contained in:
Wellington Duarte Santos 2022-11-01 09:22:27 -03:00
parent 1d78e7e7fe
commit 2d064c05b9

View File

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