title: Check pathname for Array
body: <p>i got a question:</p>
  
  <p>This code snippet works great:</p>
  
  <pre><code>$(document).ready(function(){         
      var pathname = window.location.pathname;
      if(pathname.indexOf( 'word1' ) &gt; -1){
          // do something    
      }     
  });
  </code></pre>
  
  <p>But if i want to check for array of word´s it doesnt work:</p>
  
  <pre><code>$(document).ready(function(){         
      var myArray1 = new Array( "word1","word2","word3","word4" );
      var pathname = window.location.pathname;
      if(pathname.indexOf( myArray1 ) &gt; -1){
          // never executed!   why? 
      }     
  });
  </code></pre>
  
  <p>Anybody could help with this problem? Greetings!</p>