JS Tutorial
Javascript-HomeJavascript-IntroductionJavaScript-File-UseJavascript-Output-ExampleJavaScript CommentJavaScript VariableJavaScript OperatorJavaScript ConsoleJavaScript StringJavaScript string splitJavaScript string sliceJavascript trim whitespaceJavaScript string indexOf methodJavaScript string lastIndexOf method
JavaScript DateJavascript conditional statement JavaScript split
JavaScript split method use to split string from a given separator
Syntax
string.split()
string.split(separator)
string.split(separator,limit)
string.split() method return array
Example

Browser support
Browser | |||||
Version | yes | yes | yes | yes | yes |
Parameter Details
Parameter | Description |
Separator | Optional - Separator is a pattern that describe where string should be occure |
Limit | Optional - Limit specify the number of string to be include in the array limit should be non negative |
Technical Details
Return value | It return array of substring |
Use limit in split method
Example

Reverse string with split method
first split string with string.split('') and make reverse by reverse function and in last join it
Example

Tips - You can reverse big string