var str = "Rose,Lotus,Sunflower,Marogold,Tulip,Jasmine"; var arr = str.split(','); console.log(arr); // Output: ["Rose", "Lotus", "Sunflower", "Marogold", "Tulip", "Jasmine"]