Entrega do Desafio #1

Merged
anacarolinaduartecavalcante merged 10 commits from feature/09-caractere-mais-repetido into master 2022-10-24 19:09:34 +00:00
Showing only changes of commit ac726642a3 - Show all commits

View File

@ -16,7 +16,13 @@
*/ */
function sum(numbers) { function sum(numbers) {
// implementar logica aqui // implementar logica aqui
return 0 let sumOfEven = 0;
for (let i = 0; i < numbers.length; i++) {
if (numbers[i] % 2 === 0) {
sumOfEven = sumOfEven + numbers[i];
}
}
return sumOfEven;
} }
// Resultados esperados // Resultados esperados