Javascript comparison between string and number
<p>Hi I'm just going over some basic javascript and I came across this piece of code</p>

<pre><code>if('3'!=3)
{
   document.write("Hello");
}
</code></pre>

<p>This writes hello to the screen, however when I change it to:</p>

<pre><code>if('3'==3)
{
   document.write("Hello");
}
</code></pre>

<p>This also writes Hello to the screen</p>

<p>Does anyone know any reason for this? I read that javascript converts a string to a number in a comparison I just dont understand the different behavior when I change the condition</p>

<p>Thanks !!</p>
