The String trim() method
By Flavio Copes
Learn how the JavaScript trim() method returns a new string with the white space removed from the beginning and the end, leaving the original string untouched.
~~~
Return a new string with removed white space from the beginning and the end of the original string
'Testing'.trim() //'Testing'
' Testing'.trim() //'Testing'
' Testing '.trim() //'Testing'
'Testing '.trim() //'Testing'~~~
Related posts about js: