Split a string into substrings using the specified separator and return them as an array.
Required. The String object or string literal to be split. This object is not modified by the split method.
Optional. A string or a Regular Expression object that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
Optional. A value used to limit the number of elements returned in the array.
The result of the split method is an array of strings split at each point where separator occurs in stringObj. The separator is not returned as part of any array element.
The following example illustrates the use of the split method.
Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards, Internet Explorer 11 standards. Also supported in Store apps (Windows 8 and Windows Phone 8.1). See Version Information.