feat(desafio07):desafio-completo #7

Merged
nicolasrosadeoliveira merged 1 commits from feature/desafio07 into develop 2022-10-28 13:44:20 +00:00

View File

@ -1,4 +1,13 @@
export function sumEven(value) { export function sumEven(value) {
// implementar logica aqui // implementar logica aqui
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;
} }