js string to array by comma code example
Example 1: javascript array to comma separated string
var colors = ["red", "blue", "green"];
var colorsCSV = colors.join(","); //"red,blue,green"
Example 2: convert comma separated string to array c#
string fruit = "Apple,Banana,Orange,Strawberry";
string[] split = fruit.Split(',');
Example 3: javascript array to string with comma
let numbers = [0, 1, 2, 3];
let numbersToString = numbers.toString();
console.log(numbersToString);
// output is "0,1,2,3"