[Solved] Quoting a list of comma separated string literals? [closed]


var str = "alice-blue, antique-white, aqua";
var arr = str.split(', ');
for(var i=0; i< arr.length;i++){
   arr[i] = "'"+arr[i]+"'";
}
var resultStr = arr.join(", ");

solved Quoting a list of comma separated string literals? [closed]