title: Why does ('0' ? 'a' : 'b') behave different than ('0' == true ? 'a' : 'b')
body: <p>Why is the result of the following two statements different?</p>
  
  <pre class="lang-js prettyprint-override"><code>('0' ? 'a' : 'b') /* -&gt; 'a' */
  ('0' == true ? 'a' : 'b') /* -&gt; 'b' */
  </code></pre>
  
  <p><a href="http://jsfiddle.net/bAffD/">jsFiddle testcase</a></p>
  
  <p>Edit:</p>
  
  <p>I should add that I suspect the '0' first statement to be cast to boolean to be compared - which should be exactly the same as " '0' == true "
  Obviously this is not true.</p>