Closed jcubic closed 8 years ago
I want to have something like this:
{{#each items}} {{this}}{{#if !@last}}, {{/if}} {{/each}}
to display comma after all items except the last one. How can I do this?
There is built-in {{#unless}} helper that solves your problem:
{{#unless}}
{{#each items}} {{this}}{{#unless @last}}, {{/unless}} {{/each}}
I want to have something like this:
to display comma after all items except the last one. How can I do this?