[] + {} is equal to [object Object], in Javascript? How?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/9032856/what-is-the-explanation-for-these-bizarre-javascript-behaviours-mentioned-in-the">What is the explanation for these bizarre JavaScript behaviours mentioned in the &#39;Wat&#39; talk for CodeMash 2012?</a>  </p>
</blockquote>



<p>I'm very new to JavaScript. I have a code like this :</p>

<pre><code>&lt;script type="text/javascript"&gt;
console.log( []  + {} );
&lt;/script&gt;
</code></pre>

<p>which on my Google chrome browser logs : </p>

<pre><code>[object Object]
</code></pre>

<p>It looks wired to me! And doing something like this : </p>

<pre><code>&lt;script type="text/javascript"&gt;
console.log( {} + {} );
&lt;/script&gt;
</code></pre>

<p>does produce :</p>

<pre><code>[object Object][object Object]
</code></pre>

<p>What is exactly happening over here in both the cases? How come <code>[]</code>,<code>{}</code> adding these two results in a array of <code>objects</code>?  </p>

<p>Thanks in advance.</p>
