title: create a comma separate list of links in ejs using express
body: <p>I have an array of usernames that is accessible in my ejs template.</p>
  
  <p>I want to create a comma-separated list of links like this:</p>
  
  <pre><code>&lt;a href="/user1"&gt;user1&lt;/a&gt;, &lt;a href="/user2"&gt;user2&lt;/a&gt; and &lt;a href="/user3"&gt;user3&lt;/a&gt;
  </code></pre>
  
  <p>Rendered html would look like this (with the usernames being links):</p>
  
  <pre><code>user1, user2 and user3 have added items to your list.
  </code></pre>
  
  <p>I can loop through and put them all on their own line, but how would I join that output with commas (the last one having "and")?</p>
  
  <pre><code>&lt;% usernames.forEach(function(username){ %&gt;
    &lt;a href="/&lt;%= username %&gt;"&gt;&lt;%= username %&gt;&lt;/a&gt;
  &lt;% }) %&gt;
  </code></pre>
  
  <p>Is there anyway to join this output on comma and add 'and' with no comma for the last one?</p>