Skip to content
FLAVIO COPES
flaviocopes.com
2026

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'
Tagged: JavaScript ยท All topics
~~~

Related posts about js: