how does if condition evaluates its value in javascript
<p>How does javascript if condition determines its value?, see this example:</p>

<pre><code>&lt;script type="text/javascript"&gt;

var bar = ("something" == true);
alert(bar); // 1

if ("something") {
    alert("hey!"); // 2
}

&lt;/script&gt;
</code></pre>

<p>Why do I get to point //2 while 'bar' at //1 is false?</p>

<p>As I can see <code>bar</code> value gets calculated in almost the same way the if condition, or it doesn't?</p>
