convert array to comma seprated string JS code example
Example 1: javascript array to comma separated string
var colors = ["red", "blue", "green"];
var colorsCSV = colors.join(","); //"red,blue,green"
Example 2: javascript array to string without commas
[1, 2, 3].join(""); // 123