Empty values in if clauses
<p>Here's a sample code:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;button onclick="myFunction();"&gt;Click!&lt;/button&gt;
&lt;script type="text/javascript"&gt;
function myFunction() {
var text = "";
if (text)
  {
  alert(text);
  }
else
  {
  alert("There's no text!");
  }
}
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I wonder is there's a difference between <em>if (text)</em> and <em>if (text != "")</em>?</p>

<p>Thanks in advance!</p>

<p>Mike</p>
