title: jQuery.inArray(), how to use it right?
body: <p>First time I work with <code>jQuery.inArray()</code> and it acts kinda strange.</p>
  
  <p>If the object is in the array, it will return 0, but 0 is false in Javascript. So the following will output: <em>"is NOT in array"</em></p>
  
  <pre><code>var myarray = [];
  myarray.push("test");
  
  if(jQuery.inArray("test", myarray)) {
      console.log("is in array");
  } else {
      console.log("is NOT in array");
  }
  </code></pre>
  
  <p>I will have to change the if statement to:</p>
  
  <pre><code>if(jQuery.inArray("test", myarray)==0)
  </code></pre>
  
  <p>But this makes the code unreadable. Especially for someone who doesn't know this function. They will expect that jQuery.inArray("test", myarray) gives true when "test" is in the array.</p>
  
  <p>So my question is, why is it done this way? I realy dislike this. But there must be a good reason to do it like that.</p>