SyntaxFix
Write A Post
Hire A Developer
Questions
Split string in JavaScript
var array = str.match(/[^\r\n]+/g);
OR
var array = str.split(/\r?\n/);