var myArray = []; for (var i = 9; i > 0; i -= 2){ myArray.push(i); } console.log(myArray); // console output [ 9, 7, 5, 3, 1 ]