Geekality
Blog
About
Search
Home
Blog
Javascript: Count number of lines in a string
Javascript: Count number of lines in a string
Published:
4 October 2018
software-development
javascript
regular-expression
const numberOfLines = subject.match(/^/gm).length