Answers for "jafvascript convert string separated by comma to array"

9

javascript array to comma separated string

var colors = ["red", "blue", "green"];
var colorsCSV = colors.join(","); //"red,blue,green"
Posted by: Guest on August-05-2019
2

javascript split string into array by comma and space

input.split(/[ ,]+/); //splits string using RegEx on a space OR a comma
Posted by: Guest on June-11-2020

Code answers related to "jafvascript convert string separated by comma to array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language