This filter reverses the order of array or string elements.
{% foreach item in [1, 2]|reverse %}
{{item}} <br />
{% endforeach %}
Result
2
1
{{ '1234'|reverse }}
Result
4321
This filter reverses the order of array or string elements.
{% foreach item in [1, 2]|reverse %}
{{item}} <br />
{% endforeach %}
2
1
{{ '1234'|reverse }}
4321