javascript array to csv string code example
Example 1: javascript array to csv string
var colors = ["red", "blue", "green"];
var colorsString = colors.join(","); //"red,blue,green"
Example 2: js array to csv
const arrayToCSV = (arr, delimiter = ',') =>
arr.map(v => v.map(x => `"${x}"`).join(delimiter)).join('\n');