javascript split length string

 

 

 

 

Count the number of lines: var numberOfLines document.getElementById("txt").value. split("n").lengthIf the Last Modified: 2012-05-10. JavaScript: Split string at first space. I want "var firstBit" to contain everything before the first space in " str" and "var