Merge pull request 'feat(sumEven): algoritmo criado.' (#7) from feature/algorithm07 into development

Reviewed-on: #7
This commit is contained in:
Luiz Felipe Silva 2022-11-01 01:30:21 +00:00
commit 5ee32678bf

View File

@ -1,4 +1,10 @@
export function sumEven(value) { export function sumEven(value) {
// implementar logica aqui // implementar logica aqui
let contador = 0;
for(let i = 0; i < value.length; i++) {
if(value[i] % 2 == 0) contador += value[i];
}
return contador;
} }