javascript empty array seems to be true and false at the same time
<p>Empty arrays are true but they're also equal to false.</p>

<pre><code>var arr = [];
console.log('Array:', arr);
if (arr) console.log("It's true!");
if (arr == false) console.log("It's false!");
if (arr &amp;&amp; arr == false) console.log("...what??");
</code></pre>

<p>Output:</p>

<pre><code>Array: []
It's true!
It's false!
...what??
</code></pre>

<p>I guess this is due to the implicit conversion operated by the equality operator.</p>

<p>Can anyone explain what's going on behind the scenes?</p>
