title: Node.js express, handlebars - get elements of an array
body: <p>I have an array like this:</p>
  
  <pre><code>var arr = ["element1","element2"];
  </code></pre>
  
  <p>and I would like to get the elements of it in a handlebars file.</p>
  
  <p>I googled with no result the only solution what i found is this:</p>
  
  <pre><code>{{#each files}}
  &lt;a href="/"{{path}}""&gt;{{title}}&lt;/a&gt;
  {{/each}}
  </code></pre>
  
  <p>But this is not good for me because I would like to achive that all of my files in a directory could be downloadable.</p>
  
  <p>The code what I tried on the server side:</p>
  
  <pre><code>app.get('/download',function(req,res){
  var items;
  fs.readdir('./download',function(err,files){
          items = files;
  });
  
  res.render('download',{
      files:items
  });
  });
  </code></pre>
  
  <p>And I don't know how to iterate on the client side to make all of the elements in the array downloadable.</p>
  
  <p>On the clien side I have an unordered list which will contain the links. The problem is, that I have no idea how to achive that. </p>
  
  <p>The code on the clien side:</p>
  
  <pre><code>&lt;div id="container"&gt;
              &lt;div class="highlight"&gt;
                  &lt;img src="img/highlight.png"&gt;&lt;/img&gt;
                  &lt;p&gt;A Click to download&lt;/p&gt;
              &lt;/div&gt;
              &lt;ul&gt;
                  &lt;li class="RoundedAll"&gt;&lt;a href="/"&gt;Back&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
              &lt;br /&gt;
              &lt;ul&gt;
                  &lt;!-- What should I put here? --&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>Thanks for answers.</p>