From 663341a99a1b69b8e7a54fb4f7eea56941a18923 Mon Sep 17 00:00:00 2001 From: ManuelaLuanaSchumackerTavares Date: Fri, 28 Oct 2022 16:19:22 -0300 Subject: [PATCH] feat(desafio): Adiciona setima tarefa concluida --- 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..e925b45 100644 --- a/07-sumEven/index.js +++ b/07-sumEven/index.js @@ -1,4 +1,10 @@ export function sumEven(value) { // implementar logica aqui - + let somaPar = 0; + for(let i = 0; i < value.length; i++){ + if(value[i] % 2 == 0){ + somaPar += value[i]; + } + } + return somaPar; } \ No newline at end of file