From 906028da29dc93e66f91852f9b12cbf4e0795bd6 Mon Sep 17 00:00:00 2001 From: Douglas Nobrega Date: Fri, 28 Oct 2022 18:40:50 -0300 Subject: [PATCH] desafio 07-concluido --- 07-sumEven/index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/07-sumEven/index.js b/07-sumEven/index.js index bb1e095..ed4f14c 100644 --- a/07-sumEven/index.js +++ b/07-sumEven/index.js @@ -1,4 +1,10 @@ export function sumEven(value) { // implementar logica aqui - -} \ No newline at end of file + let contador = 0; + for (let i = 0; i < value.length; i++) { + if (value[i] % 2 === 0) { + contador += value[i]; + } + } + return contador; +}