title: javascript comparison crises
body: <p>I came across the following and was unable to grasp the reason, can anyone explain please?</p>
  
  <pre><code>var foo = [0];
  console.log(foo == !foo); // true 
  console.log(foo == foo);  // true
  </code></pre>