Difference between Boolan(!x) and Boolean(x==0)?
<p>Code-snippet 1:</p>

<pre><code>if ( !x ) { /* do stuff */ }
</code></pre>

<p>Code-snippet 2:</p>

<pre><code>if ( x == 0 ) { /* do stuff */ }
</code></pre>

<p>For what values of <code>x</code> do these two code-snippets differ? </p>

<p>I am asking because, although I read the chapter on <code>==</code> in the spec, I still find it hard to deal with situations like the above (where it is combined with ToBoolean coercion). </p>

<p>btw, I want to know this just for the sake of knowing it (I want to understand the language), so don't bother telling me about <code>===</code> or asking me what <code>x</code> is.  </p>

<p><em><strong>Update:</em></strong> I corrected the fist snippet. I meant <code>!x</code>.</p>
