JavaScript: Array.prototype.join
arrayX.join()
- Join array elements to string, using comma
","
. arrayX.join(seperator_string)
- Use seperator_string between elements.
console.log( [3,4,5].join() === "3,4,5" ); // true console.log( [3,4,5].join( "-" ) === "3-4-5" ); // true