Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Count Backwards With a For Loop

var myArray = [];
for (var i = 9; i > 0; i -= 2){
    myArray.push(i);
}
console.log(myArray); // console output [ 9, 7, 5, 3, 1 ]
 
PREVIOUS NEXT
Tagged: #Count #Backwards #With #For #Loop
ADD COMMENT
Topic
Name
1+5 =