Check if string is a URL?

ok thanks!

so what is length > 1… the length of the remaining bit where it split “http://” ?

The split function returns an array, so if you have:

myString = "a,b,c,d,e";

if you do 

myString.split(",") you will get an array of 5 elements, so the length will be 5

if you do

myString.split("hello") the length of the array will be 0 because the separator won't be found