top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is use for split() function in javascript ?

0 votes
296 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
...