How to split a comma separated string and process in a loop using JavaScript?
Try the following snippet:
var mystring = 'this,is,an,example'; var splits = mystring.split(","); alert(splits[0]); // output: this