In this separator specifies which character will be use to separate the string in to substring and limit specifies the integer number which further specifies the number of splits to be displayed or found.
Lets have a look on the following example:
var str = "Earth is round, and Moon is round.";
var splitted = str.split(" ", 5);
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here