jQuery Template Formatting with Comma
<p>I have the following template. I want to display the categories with a comma in between. How do I do it?</p>

<p>Currently it is without comma using <code>Categories: {{each categories}}  &lt;i&gt;${$value}&lt;/i&gt;   {{/each}}</code></p>

<p>Note: There should be no comma after the last item. Also all items should be displaying in one row (as it is currently)</p>

<pre><code>&lt;script id="Script1" type="text/x-jQuery-tmpl"&gt;
    &lt;h1&gt;${postTitle}&lt;/h1&gt;

    &lt;p&gt;
        ${postEntry}
    &lt;/p&gt;

    {{if categories}}  
      Categories: {{each categories}}  &lt;i&gt;${$value}&lt;/i&gt;   {{/each}}
    {{else}}
      Uncategorized
    {{/if}}

&lt;/script&gt;



 &lt;script type="text/javascript"&gt;
  var blogPostsArray = [
            {
                postTitle: "Learn jQuery",
                postEntry: "Learn jQuery easliy by following.... ",
                categories: ["HowTo", "Sinks", "Plumbing"]
            },
            {
                postTitle: "New Tests",
                postEntry: "This is a test website"
            }
        ];

  $("#blogPostTemplate").tmpl(blogPostsArray).appendTo("#blogPostContainerDiv");

&lt;/script&gt;
</code></pre>
