0
I need to show even numbers from X to Y, being that X receives 32 and Y 321, or be required to show even numbers from 32 to 321, but after the execution of my code in Javascript appears "Undefined", would have to remove?
function pares(x, y,) {
for(var i = x; i <= y; i++){
i%2==0 ? console.log(i): 'Impar';
}
}
console.log(pares(32, 321));
Change <= to <? Or maybe refer to the return of the function that is Undefined?
– Sergio
Declare an array type Let variable with even values.
My.push
– Maury Developer