forked from M3-Academy/challenge-algorithms-v2.0
feat: Implementa Desafio 2.7
This commit is contained in:
parent
65a042e80b
commit
468061254e
@ -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;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user