title: Why does using "0" with the ternary operator return the first value?
body: <p>I was playing around with JSconsole and found something strange. The value of <code>"0"</code> is false</p>
  
  <pre><code>"0" == false
  =&gt; true
  </code></pre>
  
  <p>The value of <code>false</code> when used in ternary returns the second value</p>
  
  <pre><code>false ? 71 : 16
  =&gt; 16
  </code></pre>
  
  <p>However the value <code>"0"</code> which equals <code>false</code> when used in ternary returns the first value.</p>
  
  <pre><code>"0" ? 8 : 10
  =&gt; 8
  </code></pre>
  
  <p>However, if you use <code>0</code> as the value, it returns the second value</p>
  
  <pre><code>0 ? 4 : 5
  =&gt; 5
  
  0 == "0"
  =&gt; true
  </code></pre>
  
  <p>I'm afraid this doesn't make sense to me. </p>