From 41336757a9f35d842a3e02612568e99f506f6a50 Mon Sep 17 00:00:00 2001 From: wellington carlos Date: Fri, 28 Oct 2022 20:50:13 -0300 Subject: [PATCH] (feat) finalizando teste 07-sumEven --- 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..9ae806f 100644 --- a/07-sumEven/index.js +++ b/07-sumEven/index.js @@ -1,4 +1,10 @@ export function sumEven(value) { - // implementar logica aqui - + let resultado = 0 + for (const number of value) { + if (number % 2 == 0) { + resultado += number + } + } + return resultado + } \ No newline at end of file