forked from M3-Academy/challenge-algorithms-v2.0
develop #11
@ -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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user