sumEven atualizado
This commit is contained in:
parent
2a50005c31
commit
0f1c198c1e
@ -1,4 +1,8 @@
|
||||
export function sumEven(value) {
|
||||
// implementar logica aqui
|
||||
|
||||
let total = 0;
|
||||
for (let i = 0; i < value.length; i++) {
|
||||
if (value[i] % 2 == 0) total += value[i];
|
||||
}
|
||||
return total;
|
||||
}
|
Loading…
Reference in New Issue
Block a user