Lodash _.split() Method
The Lodash _.split() method splits the given string by the given separator and up to the given limit length.
_.split( string, separator, limit )
Parameters: This method accepts three parameters as mentioned above and described below:
- string: The string to split.
- separator: The separator by which string is to be split.
- limit: The length to truncate results.
Return Value: This method returns an array.
[ 'Geeks', 'for', 'Geeks' ]
Example 2: The array limited to size of 1.
[ 'Geeks' ]