Why does a string get mutilated when it becomes `this`?
<p>I discovered a peculiarity in JavaScript (or perhaps my browser's idea of it):</p>

<pre><code>var s = "Hello, world";

function foo(arg)
{
    console.log(arg);
    console.log(this);
}

foo.call(s, s);
</code></pre>

<p>Running the above with Firebug console enabled, I get:</p>

<pre><code>Hello, world
String { 0="H", 1="e", more...}
</code></pre>

<p>Why does the string automatically get turned into a weird object before becoming the <code>this</code> passed to <code>foo</code> ?</p>

<p>The reason I call it a weird object is because jQuery chokes on it.  For example:</p>

<pre><code>$.each(["one", "two", "three"], function(i, x) {
    $('&lt;p&gt;&lt;/p&gt;').text(x)   .appendTo('body'); // Works
    $('&lt;p&gt;&lt;/p&gt;').text(this).appendTo('body'); // Doesn't work
});
</code></pre>
