challenge-algorithms-v2.0-a.../07-sumEven/index.js

14 lines
266 B
JavaScript

export function sumEven(value) {
function retornaNNumerosPares(n) {
let numerosPares = [];
for (let i = 0; i < n; i++) {
if (i % 2 == 0) {
numerosPares.push(i)
}
}
return numerosPares;
}
retornaNNumerosPares(1, 40)
}