I want to create an Array from strings
That is how the string is formatted
const someString = "a,b,c,d";
And I need an Array like this
const someArray = ["a", "b", "c", "d"];
I want to create an Array from strings
That is how the string is formatted
const someString = "a,b,c,d";
And I need an Array like this
const someArray = ["a", "b", "c", "d"];
Use String.prototype.split()
const someString = "a,b,c,d";
const someArray = someString.split(',');
MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split