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

4 lines
137 B
JavaScript

export function sumEven(value) {
// implementar logica aqui
return value.reduce((acc,curr)=>acc + (curr % 2 == 0 ? curr : 0), 0);
}