Software Development Javascript: Count number of lines in a string October 4, 2018 Torleif Leave a comment const numberOfLines = subject.match(/^/gm).length;