From c3bfe720f3527a17a4cc8712596bf089e9a7034c Mon Sep 17 00:00:00 2001 From: Andrea Matsunaga Date: Sun, 30 Oct 2022 14:44:32 -0300 Subject: [PATCH] =?UTF-8?q?feature:=20resolve=20exerc=C3=ADcio=2007-sumEve?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 07-sumEven/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/07-sumEven/index.js b/07-sumEven/index.js index bb1e095..2e83838 100644 --- a/07-sumEven/index.js +++ b/07-sumEven/index.js @@ -1,4 +1,11 @@ export function sumEven(value) { // implementar logica aqui - + let sum = 0; + + for (let number of value) { + if(number % 2 === 0) { + sum += number; + } + } + return sum; } \ No newline at end of file