if element in array in javascript
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/237104/array-containsobj-in-javascript">array.contains(obj) in JavaScript</a>  </p>
</blockquote>



<p>Coming from python, I'm used to the convenient <code>in</code> keyword:</p>

<pre><code>if "bunch" in ["a", "bunch", "of", "stuff"]:
    print "Party"
</code></pre>

<p>The best way I could find to emulate this use of a list display in javascript is</p>

<pre><code>if(["a", "bunch", "of", "stuff"].indexOf("bunch") != -1){
    console.log("Party");
}
</code></pre>

<p>Is there a more commonly used javascript idiom for this, or am I spoiled by python's clean semantics?</p>

<p>EDIT: To be clear, I'm not asking only whether this is possible in JS, but what is the most commonly used idiom.</p>
