top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

What is use for split() function in javascript ?

0 votes
90 views
What is use for split() function in javascript ?
posted Aug 5, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

split() function is used to split a string into subsrings

See the example in w3schools
http://www.w3schools.com/jsref/jsref_split.asp

This is most often used when we have a string with comma separated items something like
"Tom,Dick,Harry"

Using this function we can split this string into a array of substrings [ "Tom" , "Dick" , "Harry"]

answer Aug 5, 2014 by Shyam Purkayastha
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...