Feat:Finalaizando SumEven

This commit is contained in:
Gustavo Rallenson Gonçalves Da Silva 2022-10-28 21:28:26 -03:00
parent 8f5230da66
commit bc26939af9

View File

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