Javascript if expression evaluation
<p>I was wondering when the Javascript <code>if</code> expression actually evaluates to <code>false</code> and when to <code>true</code>. When is the <code>if</code> statement <code>false</code>, and <strong>is that true for all JS interpreters</strong>?</p>

<p>I guess the condition is <code>false</code> on</p>

<ul>
<li><code>false</code></li>
<li><code>undefined</code></li>
<li><code>null</code></li>
<li><code>0</code></li>
</ul>

<p>otherwise <code>true</code>. Is that correct for all implementations (tested in Safari/WebKit console), or am I better off with explicit checking like <code>(typeof a  === "undefined")</code>?</p>
