forked from M3-Academy/challenge-algorithms-v2.0
Merge branch 'feature/07-sumEven' into developer
This commit is contained in:
commit
47c2eca88c
@ -1,4 +1,10 @@
|
|||||||
export function sumEven(value) {
|
export function sumEven(value) {
|
||||||
// implementar logica aqui
|
// implementar logica aqui
|
||||||
|
var total = 0;
|
||||||
|
for (let i of value) {
|
||||||
|
if (i % 2 ===0) {
|
||||||
|
total += i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return total;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user