Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add quotes to array items

var array1 = ["test, test1"];

 var array = array1[0].split(',');
array = array.map(i => '"' + i + '"');
alert(array)
 Run code snippet
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #quotes #array #items
ADD COMMENT
Topic
Name
6+4 =