Possible Duplicate:
How do I add a separator between elements in an {{#each}} loop except after the last element?
As a simplest case, lets say that I have a list of names and I want them to be displayed with commas between them. I could do
{{#each name in names }} {{name}}, {{/each}}
which would then produce the last
John, Paul, George, Ringo,
with a final comma that is not wanted. I can think of ways to handle this by adding the commas in my controller functions, but that seems awkward and kind of infringes on the MVC separation. Is there a way just in handlebars to identify when you're dealing with the last element and adjust accordingly?