I have a comma-separated string that I want to convert into an array, so I can loop through it.
For example, I have this string
var str = "January,February,March,April,May,June,July,August,September,October,November,December";
Now I want to split this by the comma, and then store it in an array.
Is there anything built-in to do this?
Of course I can write a custom function to do this. Or even better import one of the many existing libraries already written and well tested to process comma separated values, such as jquery-csv. But is there something built in?