I have an array. I need to create a string with the values in the array. Eg: array = [100,200,300] the string should look like '100'',''200'',''300'
any quick suggestions?
Regards Giri
const myString = array.join(',')
This will join each element in the array with a ,
delimiter.
EDIT:
To get quotes in your string, to match the `"100","200","300" pattern, use:
const myString = array.join('","');
"100", "200", "300"
or a string like:100,200,300
?