How can I get the index of an array in a Meteor template each loop?

meteor >= 1.2 Spacebars gained a lot of functionality in 1.2, including a native @index. Helpers are no longer needed to solve this problem – you can simply do this: {{#each getArray}} <div class=”item” data-value=”{{@index}}”>{{this}}</div> {{/each}} or, if you want to use the index inside a helper: {{#each getArray}} <div class=”item” data-value=”{{someHelper @index}}”>{{this}}</div> {{/each}} meteor … Read more