# Using Array.prototype.reverse() function
var arr = [1, 2, 3, 4, 5];
arr.slice().reverse()
.forEach(function(item) {
console.log(item);
});
# Alternatively, you can use the Object.keys() method to get keys:
var arr = [1, 2, 3, 4, 5];
Object.keys(arr).reverse()
.forEach(function(index) {
console.log(arr[index]);
});