Reputation: 71
I have a collection and I want to loop through it but starting from the last index to the first. Is it possible? How?
Upvotes: 0
Views: 293
Reputation: 1576
You can do the following:
bc.chain().reverse().each(function(item){console.log(item)});
That will 'chain' the collection, reverse it and iterated over the reversed version.
Hope that helps.
Upvotes: 1