title: Find string using JQuery.inArray()
body: <p><strong>Goal:</strong> 1) Create a string using the ID attributes of several elements.
  2) Push that string to an array.
  3) Check to see if the string in the array forms a particular word -- in this case, "idaho".</p>
  
  <p><strong>Problem:</strong> I can only seem to verify that a particular <em>character</em> is in the array. If I use more than one character in the "value" of "$.inArray", it returns false.</p>
  
  <p><strong>Question:</strong> How can I verify that the string in the array forms the word "idaho" instead of just verifying that the string contains an "i" or "d" or "a", etc.?</p>
  
  <p>This <a href="http://jsfiddle.net/KriegersVan/q3x1gg9b/" rel="nofollow">FIDDLE</a> works, but only because it's looking for an "i" instead of "idaho".</p>
  
  <p>I've done a lot of research on this, but can't get it to work. Thanks for helping a noob!</p>
  
  <pre><code>&lt;div class="pieces" id="i"&gt;&lt;/div&gt;
  &lt;div class="pieces" id="d"&gt;&lt;/div&gt;
  &lt;div class="pieces" id="a"&gt;&lt;/div&gt;
  &lt;div class="pieces" id="h"&gt;&lt;/div&gt;
  &lt;div class="pieces" id="o"&gt;&lt;/div&gt;
  
   var piecesArray = [];
   var ids = $('.pieces').map(function() {
     piecesArray.push(this.id);
   });
   piecesArray = piecesArray.join('');
    if ($.inArray('i', piecesArray) !==-1){
      alert(piecesArray);
    }
  </code></pre>