Javascript split() method reference

Description
Split a string into an array of substrings.

Syntax

string.split(separator,limit)

Examples

var str = "How are you doing today?";
var res = str.split(" ");
console.log(res); //[How,are,you,doing,today?]
var str = "How are you doing today?";
var res = str.split(" ",3);
console.log(res); //[How,are,you]