Is empty string treated as falsy in javascript?
<p>I've noticed that if you have a statement as the following:</p>

<pre><code>var test = "" || null
</code></pre>

<p><code>test</code> will evaluate to <code>null</code> but if we do something like the following:</p>

<pre><code>var test = "test" || null
</code></pre>

<p><code>test</code> will evaluate to "test", the same holds true for any object in place of the string, so does javascript treat empty string as either a falsy or null value, and if so why? Isn't an empty string still an object, so shouldn't it be handled the same?</p>

<p>I've tested this out in FireFox, Chrome, IE7/8/9, and Node.</p>
