forked from M3-Academy/challenge-algorithms-v2.0
feature: resolve exercício 07-sumEven
This commit is contained in:
parent
adfcec5277
commit
c3bfe720f3
@ -1,4 +1,11 @@
|
||||
export function sumEven(value) {
|
||||
// implementar logica aqui
|
||||
|
||||
let sum = 0;
|
||||
|
||||
for (let number of value) {
|
||||
if(number % 2 === 0) {
|
||||
sum += number;
|
||||
}
|
||||
}
|
||||
return sum;
|
||||
}
|
Loading…
Reference in New Issue
Block a user