forked from M3-Academy/challenge-algorithms-v2.0
14 lines
266 B
JavaScript
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)
|
|
|
|
} |