title: Why javascript treats 0 equal to empty string?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/462663/implied-string-comparison-0-but-1-1">Implied string comparison, 0=&#39;&#39;, but 1=&#39;1&#39;</a>  </p>
  </blockquote>
  
  
  
  <p>Executing the following case in javascript, I get 0 equal to '' (an empty string)</p>
  
  <pre><code>var a   =   0;
  var b   =   '';//empty string
  if(a==b){
      console.log('equal');//this is printed in console
  }else{
      console.log('not equal');
  }
  </code></pre>
  
  <p>Could anyone guide that what is the reason behind this?</p>