feat: criando a area do codigo dos numeros pares da sumEven

This commit is contained in:
PATRICK DE SOUZA SILVA 2022-10-29 10:59:44 -03:00
parent c6f6df9c59
commit 8350f35bb5

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
}