title: Handlebars return an array element with certain index if the length is unknown
body: <p>Using Handlebars and Node, I have an array with changing length and I need always to get the one before last element of it each time it changes.</p>
  
  <p>So if you want to get the last element, you can do:</p>
  
  <pre><code>{{#each array}}
    {{#if @last}}
      {{this}}
    {{/if}}
  {{/each}}
  </code></pre>
  
  <p>and it will return you the last element.
  I have Math helper, that can perform basic mathematical operations.
  For example I can get with it the needed index number</p>
  
  <pre><code>{{math array.length '-' 1}}
  </code></pre>
  
  <p>but I cant use it with another block helper, for example:</p>
  
  <pre><code>{{#each array}}
    {{#if math @last '-' 1}}
      {{this}}
    {{/if}}
  {{/each}}
  </code></pre>
  
  <p>How could this be done? Thank you.</p>