In Javascript, how to explain 0 == "" returning true?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/7605011/why-is-0-true-in-javascript">Why is 0 == &ldquo;&rdquo; true in JavaScript</a>  </p>
</blockquote>



<p>The following is done in Firebug:</p>

<pre><code>&gt;&gt;&gt; 0 == ""
true

&gt;&gt;&gt; "" == false
true
</code></pre>

<p>But how did the <code>""</code> get converted to <code>0</code>?  I think the reason they both returned <code>true</code> was that <code>""</code> gets converted to <code>0</code>, and in the first case, it becames <code>0 == 0</code>, and in the second case, first to <code>"" == 0</code> and then <code>0 == 0</code> and so both cases returned true, but how did <code>""</code> get converted into <code>0</code>?   The Javascript Definitive Guide says the string is converted to a number, but how specifically?</p>
