массив JavaScript в список запятой
var colors = ["red", "blue", "green"];
var colorsCSV = colors.join(","); //"red,blue,green"
Grepper
var colors = ["red", "blue", "green"];
var colorsCSV = colors.join(","); //"red,blue,green"
var array = string.split(',');
let numbers = [0, 1, 2, 3];
let numbersToString = numbers.toString();
console.log(numbersToString);
// output is "0,1,2,3"