1var str = "my car is red";
2var stringArray = str.split(/(\s+)/);
3
4console.log(stringArray); // ["my", " ", "car", " ", "is", " ", "red"]
1var myString = 'IE, Firefox, Opera, Chrome, Safari';
2var myStringArray = myString.split(',');
3
4The values are now in myStringArray - myStringArray[0] would be 'IE'