Answers for "for loop array backwards"

13

js loop backwards

var arr =  [1, 2, 3, 4, 5];
 
for (var i = arr.length - 1; i >= 0; i--) {
    console.log(arr[i]);
}
Posted by: Guest on May-01-2020
3

js loop array backwards

setTimeout(myFunction, 3000);

// if you have defined a function named myFunction 
// it will run after 3 seconds (3000 milliseconds)
Posted by: Guest on February-01-2022

Code answers related to "for loop array backwards"

Code answers related to "Javascript"

Browse Popular Code Answers by Language