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