title: jQuery each store returned data in to string
body: <p>I am looping through a bunch of p tags to get the value. I am trying to check that there are no duplicate entries when a user enters a new value.</p>
  
  <p>How would I loop through the p tags, and store the text value in to an array or even a string so that I can late check for duplicates?</p>
  
  <p>My p tags are structured like so:</p>
  
  <pre><code>&lt;p class="favorite-tag-name"&gt;My Favorite Storage&lt;/p&gt;
  </code></pre>
  
  <p>I have tried to loop through to store the values into a variable, but it seems to only store the last value, instead of all.</p>
  
  <pre><code>var catNames = jQuery( ".favorite-tag-name" ).each(function() {
                                                  jQuery(this).text();
                                          });
  </code></pre>
  
  <p>I want to loop through and stored all of the values into an array or string so that I can crosscheck with the new entries.</p>