twig last loop code example
Example 1: how to for loop twig
{% for letter in 'a'..'z' %}
* {{ letter }}
{% endfor %}
Example 2: index first twig
{{ loop.index }}
OR
{{ loop.index0 }}
{% for letter in 'a'..'z' %}
* {{ letter }}
{% endfor %}
{{ loop.index }}
OR
{{ loop.index0 }}