forked from M3-Academy/challenge-algorithms-v2.0
11 lines
217 B
JavaScript
11 lines
217 B
JavaScript
export function sumEven(value) {
|
|
// implementar logica aqui
|
|
let resultEvenSum = 0;
|
|
value.forEach(element => {
|
|
if ((element % 2) === 0) {
|
|
resultEvenSum += element;
|
|
}
|
|
});
|
|
|
|
return resultEvenSum;
|
|
} |