I created my function:
function call() {
var value= [];
var arr = data.split(',');
for (i = 0; i < arr.length; i++) {
var a = "'" + arr[i] + "'";
value.push(a);
alert(value);
}
}
output is coming like this:
value='a','b','c','d';
but i need like this:
value=a','b','c','d;
helps are mostly appreciable. thank you
I don't know why you want to do such thing, but you could achieve this just by simply join with ','
var arr = data.split(',');
alert(arr.join("','"))
Simple code simple life :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With