forked from M3-Academy/challenge-algorithms-v2.0
feature/algorithms #1
@ -1,4 +1,8 @@
|
||||
export function sumEven(value) {
|
||||
// implementar logica aqui
|
||||
|
||||
return value.filter((number) => {
|
||||
if(number % 2 == 0) return number;
|
||||
}).reduce((ac, number) => {
|
||||
return ac += number;
|
||||
}, 0);
|
||||
}
|
Loading…
Reference in New Issue
Block a user