diff --git a/07-sumEven/index.js b/07-sumEven/index.js index bb1e095..8fff8f4 100644 --- a/07-sumEven/index.js +++ b/07-sumEven/index.js @@ -1,4 +1,13 @@ export function sumEven(value) { // implementar logica aqui - -} \ No newline at end of file + const newArray = value; + var i; + let total = 0; + + for (i = 0; i < newArray.length; i++) { + if (newArray[i] % 2 === 0) { + total = total + newArray[i]; + } + } + return total; +} \ No newline at end of file