title: Getting values from an HTMLCollection to a string
body: <p>I am attempting to grab the selected values of a multi-select dropdown and convert them into a single string for later manipulation. At the moment I have the following code: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    function newComic()
     {
      var elem = document.querySelector("#genreList").selectedOptions;
      var arr = [].slice.call(elem);
      var genres = arr.join(', ');
      window.alert(genres);
      }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;select id="genreList" multiple="multiple" name="addGenre[]"  style="width: 150px;font-size: 10pt;"&gt;
       &lt;option value="Action"&gt;Action&lt;/option&gt;
       &lt;option value="Comedy"&gt;Comedy&lt;/option&gt;
       &lt;option value="Fantasy"&gt;Fantasy&lt;/option&gt;
       &lt;option value="Horror"&gt;Horror&lt;/option&gt;
       &lt;option value="Mystery"&gt;Mystery&lt;/option&gt;
       &lt;option value="Non-Fiction"&gt;Non-Fiction&lt;/option&gt;
       &lt;option value="Period"&gt;Period&lt;/option&gt;
       &lt;option value="Romance"&gt;Romance&lt;/option&gt;
       &lt;option value="Sci-Fi"&gt;Sci-Fi&lt;/option&gt;
       &lt;option value="Thriller"&gt;Thriller&lt;/option&gt;
      &lt;/select&gt;&lt;/p&gt;
                  
                  &lt;p&gt;&lt;input type="button" onclick="newComic()" value="Add Comic" id="btnAddComic" style="font-size: 10pt; width: 150px; height:40px;"&gt;&lt;/p&gt;
      </code></pre>
  </div>
  </div>
  </p>
  
  <p>The alert window is currently outputting the following:</p>
  
  <p>[object HTMLOptionElement, object HTMLOptionElement, ...] </p>
  
  <p>where '...' represents any further hypothetical options.</p>
  
  <p>What I need is for 'genres' to output as, for example, 'Action, Romance, Thriller' instead.</p>
  
  <p>Thanks in advance for any help.</p>