2022-10-27 15:07:13 +00:00
|
|
|
export function sumEven(value) {
|
2022-10-30 18:02:05 +00:00
|
|
|
let somaPares = 0;
|
|
|
|
for (let index = 0; index < value.length; index++) {
|
|
|
|
if (value[index] % 2 === 0) {
|
|
|
|
somaPares = somaPares + value[index];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return somaPares;
|
|
|
|
}
|