Check this out
alert("wtf/http://google.com".split('/', 2));
the resulted array contains 2 elements: wtf, http:.
Shouldn't it have wtf and the rest of the string? :/
The 2nd value passed to the split function limits your results but not where the array is split. To clarify the split separates it into 4 sections first then only returns the first two.
If you're trying to split out the wtf and the url try the following:
alert("wtf/http://google.com".split(/\/(.+)/,2))
.split(/\/\/)instead. Unless marked as global (/g), a regex will only match once.