JavaScript identity operator on strings
<p>I'm trying to write a prototype for determining if a string is empty. It's really just playing with JS and prototype, nothing important. Here's my code:</p>

<pre><code>String.prototype.IsEmpty = function() {
  return (this === "");
}
</code></pre>

<p>Notice I used the <code>===</code> identity comparison instead of <code>==</code> equality. When I run the function with the above definition:</p>

<pre><code>"".IsEmpty(); // false
</code></pre>

<p>If I chagne the definition to use <code>==</code> as:</p>

<pre><code>String.prototype.IsEmpty = function() {
  return (this == "");
}
</code></pre>

<p>The new def'n will do:</p>

<pre><code>"".IsEmpty(); // true
</code></pre>

<p>I don't understand why <code>===</code> doesn't work since <code>""</code> is identical to <code>""</code></p>
