The String trimEnd() method
By Flavio Copes
Learn how the JavaScript trimEnd() method returns a new string with the white space removed only from the end, leaving any leading white space in place.
~~~
Return a new string with removed white space from the end of the original string
'Testing'.trimEnd() //'Testing'
' Testing'.trimEnd() //' Testing'
' Testing '.trimEnd() //' Testing'
'Testing '.trimEnd() //'Testing'~~~
Related posts about js: