How to use .indexOf JS function with array? or Alternative?
<p>Is there possibility of using <code>.indexOf</code> function with an array to search with? Like This:</p>

<pre><code>var d = "Hello";
var s = new Array ("Heart", "David", "Foo", "Hello");
if( d.indexOf(s) != -1) {
  alert("Found Hello");
}
</code></pre>

<p>If I use above code then it does not alert anything. I checked console but <strong>no errors</strong>. </p>

<p><em>I read somewhere that <code>.indexOf</code> function is for strings only not for array of string.</em> </p>

<p><em>Is there alternative of <code>indexOf</code> in Javascript or <code>.indexOf</code> already provides what i want?</em></p>

<p><a href="http://jsfiddle.net/UndfJ/" rel="nofollow"><strong><em>Fiddle</em></strong></a></p>
