This article is a mirror article of machine translation, please click here to jump to the original article.

View: 9199|Reply: 0

[JavaScript] JavaScript split() method

[Copy link]
Posted on 2/15/2019 2:56:51 PM | | |
split() method is used to split a string into string arrays.

Return value
An array of strings. The array is created by splitting the stringObject into substrings at the boundaries specified by the separator. The string in the returned array does not include the separator itself.
However, if the separator is a regular expression that contains subexpressions, then the returned array includes strings that match those subexpressions (but not the text that matches the entire regex).



Example


Output:






Previous:kong plugin rate-limiting
Next:JavaScript unescape() function
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com