challenge-algorithms-v2.0-c.../07-sumEven/index.js

9 lines
173 B
JavaScript

export function sumEven(value) {
// implementar logica aqui
let res=0;
value.forEach(element => {
if(element % 2 === 0)
res+=element;
});
return res;
}