Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript loop through array backwards

var arr = [1, 2, 3, 4, 5];
 
Object.keys(arr).reverse()
        .forEach(function(index) {
            console.log(arr[index]);
        });
Source by www.techiedelight.com #
 
PREVIOUS NEXT
Tagged: #javascript #loop #array
ADD COMMENT
Topic
Name
1+4 =