Is there a way to split a string which is comma separated in to a new string? Simular to substring()
method and the split()
method.
So I want to separated this by the commas in the string:
let str = "arg1,arg2,arg3"; //and so on
and then put each value into a new string like this:
let str1 = "arg1";
let str2 = "arg2";
let str3 = "arg3";
Is there a way to do that in JavaScript?