Merge pull request 'feat(desafio07):desafio-completo' (#7) from feature/desafio07 into develop

Reviewed-on: #7
This commit is contained in:
Nicolas Rosa de Oliveira 2022-10-28 13:44:20 +00:00
commit c0f024b168

View File

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