javascript array to csv string

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

Also in JavaScript: