Array.prototype.join()
is what you’re looking for:
arr.join(',');
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/join
var arr = ['Hi', 'I', 'am', 'a', 'comma', 'separated', 'list'];
arr.join(','); // === "Hi,I,am,a,comma,separated,list"