2022-10-27 15:07:13 +00:00
|
|
|
export function sumEven(value) {
|
|
|
|
// implementar logica aqui
|
2022-10-28 15:00:57 +00:00
|
|
|
return value.filter((number) => {
|
|
|
|
if(number % 2 == 0) return number;
|
|
|
|
}).reduce((ac, number) => {
|
|
|
|
return ac += number;
|
|
|
|
}, 0);
|
2022-10-27 15:07:13 +00:00
|
|
|
}
|