From 1508b0ab9de6e2d58f85f975d9da64828e3fea24 Mon Sep 17 00:00:00 2001 From: Izabela Balizardo Date: Sat, 29 Oct 2022 19:40:33 -0300 Subject: [PATCH] feat: Adiciona 07-sumEven --- 07-sumEven/index.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/07-sumEven/index.js b/07-sumEven/index.js index bb1e095..846503d 100644 --- a/07-sumEven/index.js +++ b/07-sumEven/index.js @@ -1,4 +1,22 @@ export function sumEven(value) { // implementar logica aqui + + var soma = 0 + + for (var cont = 0; cont < value.length; cont++) { + + + if (value[cont] % 2 == 0) + + soma = soma + value[cont] + + + } + + return soma + + + + } \ No newline at end of file