feature: resolve exercício 07-sumEven

This commit is contained in:
Andrea Matsunaga 2022-10-30 14:44:32 -03:00
parent adfcec5277
commit c3bfe720f3

View File

@ -1,4 +1,11 @@
export function sumEven(value) { export function sumEven(value) {
// implementar logica aqui // implementar logica aqui
let sum = 0;
for (let number of value) {
if(number % 2 === 0) {
sum += number;
}
}
return sum;
} }