feat(sumEven): implementa function

This commit is contained in:
Cainã Milech 2022-10-28 18:20:57 -03:00
parent 0d5a0e9130
commit c2856f8a54

View File

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