From 4965ff80760e0e3033b3b967b9682842fb0b5ebb Mon Sep 17 00:00:00 2001 From: RodrigoJorge Date: Fri, 28 Oct 2022 15:45:36 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20implementa=20fun=C3=A7=C3=A3o=20sumEven?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 07-sumEven/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/07-sumEven/index.js b/07-sumEven/index.js index bb1e095..8834684 100644 --- a/07-sumEven/index.js +++ b/07-sumEven/index.js @@ -1,4 +1,9 @@ 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