how to splite text by break line in javascript code example Example: split text by new line javascript myText.split(/\n/)