forked from M3-Academy/challenge-algorithms-v2.0
10 lines
160 B
JavaScript
10 lines
160 B
JavaScript
export function sumEven(value) {
|
|
let sum = 0;
|
|
|
|
for (let number of value) {
|
|
if(number % 2 === 0) {
|
|
sum += number;
|
|
}
|
|
}
|
|
return sum;
|
|
} |