Increment declared integer variable January 7, 2024 by Tarik There’s an easier way to do what you want: {{ cycle(["even", "odd"], loop.index) }} See the docs for the loop goodies.