# The String trimEnd() method

> 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.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2019-03-10 | Topics: [JavaScript](https://flaviocopes.com/tags/js/) | Canonical: https://flaviocopes.com/javascript-string-trimend/

Return a new string with removed white space from the end of the original string

```js
'Testing'.trimEnd() //'Testing'
' Testing'.trimEnd() //' Testing'
' Testing '.trimEnd() //' Testing'
'Testing '.trimEnd() //'Testing'
```
