Meteor Handlebars: How to access a plain array?

kqw picture kqw · Jan 20, 2014 · Viewed 7.9k times · Source

var plain_array = [1, 2, 3, 4, 5, 6, 7]

How can I show all elements in Meteor Handlebars?

{{#each plain_array}}

# What to put here to get the elements?

{{/each}}

(This question is similar: handlebars: how to access an array? but not the same as the other question presumes an array of objects.)

Answer

ius picture ius · Jan 20, 2014

From Handlebars documentation.

{{#each people}}
  <li>{{this}}</li>
{{/each}}