In a DerbyJS component, I have an array items
, which I want to display in the view. I want to display the latest items of the array first, so I am looking for something like each-reverse
:
{{each-reverse items as #item}}
<p>{{#item}}</p>
{{/each-reverse}}
. Of course, this snippet of code does not work but I hope it explains what I want to achieve. Is there a way to do this in DerbyJS?
Theoretically I could reverse the items
array, but I do not want to do this, because sometimes I update this array by using .push
. Using .unshift
instead seems to be suboptimal.