consider the following javascript
var str=window.location;
newArray=str.split('/');
document.write(newArray[0]);
When I execute split on "var url" which holds "window.location" it is causing this error in firebug console
TypeError
arguments: Array[2]
message: "—"
stack: "—"
type: "undefined_method"
__proto__: Error