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