From 2e4a5caf0a3a6752685646aa1b2fd7778796899f Mon Sep 17 00:00:00 2001 From: carloswinter Date: Fri, 28 Oct 2022 16:10:35 -0300 Subject: [PATCH] feat(sumEven): adiciona resolucao questao07-sumeven --- 07-sumEven/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/07-sumEven/index.js b/07-sumEven/index.js index bb1e095..97c648c 100644 --- a/07-sumEven/index.js +++ b/07-sumEven/index.js @@ -1,4 +1,9 @@ export function sumEven(value) { // implementar logica aqui - + let res=0; + value.forEach(element => { + if(element % 2 === 0) + res+=element; + }); + return res; } \ No newline at end of file -- 2.34.1