From 151c74165a5e4a1ad2fe2c4887d81d4161f012b9 Mon Sep 17 00:00:00 2001 From: "Henrique@Martins" Date: Sat, 29 Oct 2022 15:02:54 -0300 Subject: [PATCH] feat(07-sumEven)executa exercicio 7 --- 07-sumEven/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/07-sumEven/index.js b/07-sumEven/index.js index bb1e095..55d7f16 100644 --- a/07-sumEven/index.js +++ b/07-sumEven/index.js @@ -1,4 +1,10 @@ export function sumEven(value) { // implementar logica aqui - + let soma = 0; + for(let i = 0; i < value.length; i++){ + if(value[i] % 2 === 0){ + soma += value[i]; + } + } + return soma; } \ No newline at end of file