I want to split a comma separated string with JavaScript. How?
This question is related to
javascript
var partsOfStr = str.split(',');
var array = string.split(',')
and good morning, too, since I have to type 30 chars ...
var result;_x000D_
result = "1,2,3".split(","); _x000D_
console.log(result);
_x000D_
More info on W3Schools describing the String Split function.
Use
YourCommaSeparatedString.split(',');
Source: Stackoverflow.com