feat(sumEven): desenvolvimento da função

This commit is contained in:
Lorena Camila Coelho Máximo 2022-11-01 00:42:23 -04:00
parent ff22b86c98
commit 60c42f4022

View File

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