Code to go logo
Created using Figma
Use Cases
Contribute
How to convert array to comma separated string in JavaScript
Arrays
By Jad Joubran ·
Last updated Dec 18, 2017
const elements = ["Eat", "Sleep", "Code", "Repeat"]; elements.join(",");
Eat,Sleep,Code,Repeat
Dec 18, 2017
1
Jad Joubran
See answer
1
Jad Joubran
Array.join
on MDN
Learn JavaScript step by step
Related use cases
How to split comma separated string in JavaScript