title: Concatenate appended strings and remove last character
body: <p>I have a list that I want to retrieve all items and append them to a paragraph. I am currently successful in doing so but it doesn't append into one string (you need to check the DOM to see it), but several instead. I have tried using .concat() to retrieve the new p but it returns an error. Also while appending I am adding a comma to separate the items, and need to remove the last one. I am using .slice(0, -1) to do so, but because they are all separate strings it does not work.</p>
  
  <p><a href="http://jsfiddle.net/fk5a3t28/5/" rel="nofollow">JSFiddle</a></p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;ul&gt;
      &lt;li&gt;One&lt;/li&gt;
      &lt;li&gt;Two&lt;/li&gt;
      &lt;li&gt;Three&lt;/li&gt;
      &lt;li&gt;Four&lt;/li&gt;
      &lt;li&gt;Five&lt;/li&gt;
      &lt;li&gt;Six&lt;/li&gt;
      &lt;li&gt;Seven&lt;/li&gt;
      &lt;li&gt;Eight&lt;/li&gt;
  &lt;/ul&gt;
  
  &lt;p&gt;String goes here: &lt;/p&gt;
  </code></pre>
  
  <p><strong>JS/JQuery</strong></p>
  
  <pre><code>$(document).ready(function() {
      var item = $('ul li');
      var p = $('p');
  
      item.each(function() {
          itemText = $(this).text();
          p.append(itemText + ", ").slice(0,-1);
      });
  });
  </code></pre>