feat: Implementa Desafio 2.7

This commit is contained in:
Sabrina Miranda 2022-10-28 19:30:02 -03:00
parent 65a042e80b
commit 468061254e

View File

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