title: Why does javascript's "in" operator return true when testing if 0 exists in an array that doesn't contain 0?
body: <p>Why does the "in" operator in Javascript return true when testing if "0" exists in array, even when the array doesn't appear to contain "0"?</p>
  
  <p>For example, this returns true, and makes sense:</p>
  
  <pre><code>var x = [1,2];
  1 in x; // true
  </code></pre>
  
  <p>This returns false, and makes sense:</p>
  
  <pre><code>var x = [1,2];
  3 in x; // false
  </code></pre>
  
  <p>However this returns true, and I don't understand why:</p>
  
  <pre><code>var x = [1,2];
  0 in x;
  </code></pre>