Check out example codes for "convert comma separated string to array c#". It will help you in understanding the concepts better.

Code Example 1

string fruit = "Apple,Banana,Orange,Strawberry";
string[] split = fruit.Split(',');

Code Example 2

input.split(/[ ,]+/); //splits string using RegEx on a space OR a comma

Learn ReactJs, React Native from akashmittal.com