why does passing a string as "this" cause this weirdness?
<p>I'm trying to understand why javascript is doing something unexpected (to me).  Here's a bit of code that's purely for example.  In other words, I don't actually want to extend String (I'm actually binding to functions and stuff).  So this is plain javascript with no libraries.</p>

<pre><code>var s = 'blah';

String.prototype.foo = function () {
  console.log('this === s:', this === s);
  console.log('this == s:', this == s);
  console.log('typeof this:', typeof this);
  console.log('typeof s:', typeof s);
  console.log('this:', this);
  console.log('s:', s);
};

s.foo()
</code></pre>

<p>And here's the output in Safari's script console:</p>

<pre><code>this === s: false
this == s: true
typeof this: object
typeof s: string
this: [object Object]
s: blah
</code></pre>

<p>Similar output in IE, FF, Chrome, etc.</p>

<p>I'm trying to wrap my head around why this === s is not true.  Also why this is an "object" but s is a "string".</p>

<p>What's going on here?</p>
