window.location stored to a variable causing errors
<p>consider the following javascript</p>

<pre><code>var str=window.location;
newArray=str.split('/');
document.write(newArray[0]);
</code></pre>

<p>When I execute split on "var url"  which holds "window.location"  it is causing this error in firebug console</p>

<pre><code>TypeError
arguments: Array[2]
message: "—"
stack: "—"
type: "undefined_method"
__proto__: Error
</code></pre>
