Merge pull request 'feat: criando a area do codigo dos numeros pares da sumEven' (#9) from feature/sum-even into develop

Reviewed-on: #9
This commit is contained in:
PATRICK DE SOUZA SILVA 2022-11-02 17:13:42 +00:00
commit c59a0a0cfb

View File

@ -1,4 +1,14 @@
export function sumEven(value) {
export function sumEven(values) {
// implementar logica aqui
}
let soma = 0
for (let index = 0; index < values.length; index++) {
if (values[index] % 2 === 0) {
soma += values[index]
}
}
return soma
}