decrement Tag

Creates a new number variable, decreases its value by 1 every time it is called, and outputs it.

Description

Creates a new number variable, decreases its value by 1 every time it is called, and outputs it. The initial value is -1.

Consider this example:

      {% decrement my_num %}
      {% decrement my_num %}
      {% decrement my_num %}
      

Output

-1 -2 -3

Like increment, variables declared inside decrement are independent from variables created through assign or capture.

Parameters

None.