I have a string like
This is great day, tomorrow is a better day, the day after is a better day, the day after the day after that is the greatest day
You can use .split() to create an array of all the parts of the string...
var str = 'This is great day, tomorrow is a better day, the day after is a better day, the day after the day after that is the greatest day';
str.split(',');
-> ["This is great day", " tomorrow is a better day", " the day after is a better day", " the day after the day after that is the greatest day"]
Now, you can do whatever you want with the different parts. Since you want to join with a new line, you can use .join() to put it back together...
str.split(',').join('\n');
-> "This is great day
tomorrow is a better day
the day after is a better day
the day after the day after that is the greatest day"