My array:
var str=['data1,data2 '];
I have used:
var arr = str.split(,);
But one error is showed. TypeError: Object data1,data2 has no method 'split'. How can I solve this problem.
My output will be:
arr= data1,data2
// or
arr[0]=data1;
arr[1]=data2;
How can I solve this problem ?