From 5ee7ae51ed8f6495e21cc73f45de716421b2c5c0 Mon Sep 17 00:00:00 2001 From: DaviHKlein Date: Fri, 28 Oct 2022 18:50:49 -0300 Subject: [PATCH] feat(sumEven): implementa funcao 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..7390897 100644 --- a/07-sumEven/index.js +++ b/07-sumEven/index.js @@ -1,4 +1,9 @@ export function sumEven(value) { // implementar logica aqui - + let resultado=0; + for(let i=0;i < value.length;i++){ + if(value[i] % 2 == 0) + resultado += value[i]; + } + return resultado } \ No newline at end of file -- 2.34.1