4 The ``cycle`` function cycles on an array of values:
8 {% set start_year = date() | date('Y') %}
9 {% set end_year = start_year + 5 %}
11 {% for year in start_year..end_year %}
12 {{ cycle(['odd', 'even'], loop.index0) }}
15 The array can contain any number of values:
19 {% set fruits = ['apple', 'orange', 'citrus'] %}
22 {{ cycle(fruits, i) }}
28 * ``position``: The cycle position