forked from M3-Academy/challenge-algorithms-v2.0
feat: finalizado sumEven
This commit is contained in:
parent
8134411c16
commit
42f653c394
@ -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