array to comma separated list js

JavaScript
var colors = ["red", "blue", "green"];
var colorsCSV = colors.join(","); //"red,blue,green"
Source

Also in JavaScript: