Is it possible to get the current loop index using the eco template engine?
For example in Jinja2 you can do
{% for var in array %}
{{ loop.index0 }}
{% endfor %}
If not is there a more idiomatic way of getting at the index?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From the CoffeeScript website:
Could also be written as
For the eco template, something like this should do it: