split
split has the opposite effect than join and is used to split a string into an array of strings.
stringObject.split(a,b)This is its syntax.
a is necessary to determine the division from a.
b is not required, it is optional. This parameter specifies the maximum length of the returned array. If this parameter is set, no more substrings will be returned than the array specified by this parameter. If this parameter is not set, the entire string will be split regardless of its length.
Note that a itself is not included in the returned array;
Tips and Notes
Note: If an empty string ("") is used as a, each character in stringObject will be split.
Note: String.split() performs the opposite operation of Array.join.
example
var str="Hello World!";
document.write(str.split("")+"<br/>");
document.write(str.split(" ")+"<br/>");
document.write(str.split("",3)+"<br/>");
return
H,e,l,l,o, ,W,o,r,l,d,!
Hello, World!
H,e,l