It will split string by separator.
string
separator
Optional
1.0.0
split("012345");// => ["0", "1", "2", "3", "4", "5"] Copy
split("012345");// => ["0", "1", "2", "3", "4", "5"]
split("0,1,2,3,4,5", ",");// => ["0", "1", "2", "3", "4", "5"] Copy
split("0,1,2,3,4,5", ",");// => ["0", "1", "2", "3", "4", "5"]
split("0,1,2,3,4,5", ",", 2);// => ["0", "1"] Copy
split("0,1,2,3,4,5", ",", 2);// => ["0", "1"]
It will split
string
byseparator
.