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

9 lines
188 B
JavaScript
Raw Permalink Normal View History

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