decrement
Creates and outputs a new number variable with initial value -1. On subsequent calls, it decreases its value by one and outputs the new value.
Variables created using decrement are independent from variables created using assign or capture.
Example:
liquid
{% decrement variable %}
{% decrement variable %}
{% decrement variable %}
1
2
3
2
3
Output
html
-1
-2
-3
1
2
3
2
3