JavaScript String trimEnd()
- Previous Page trim()
- Next Page trimStart()
- Go to Parent Layer JavaScript String Reference Manual
Definition and usage
trimEnd()
The method removes spaces from the end of the string.
trimEnd()
The method does not change the original string.
trimEnd()
How the method works trim()
Similar, but only removes spaces from the end of the string.
Note:trimEnd()
The method was added to JavaScript in ECMAScript 2019.
See also:
Syntax
string.trimEnd()
Parameter
No parameters.
Return value
Type | Description |
---|---|
String | The string with spaces removed from the end. |
Browser support
Starting from January 2020, all browsers support JavaScript String trimEnd()
:
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome 66 | Edge 79 | Firefox 61 | Safari 12 | Opera 50 |
April 2018 | January 2020 | June 2018 | September 2018 | May 2018 |
- Previous Page trim()
- Next Page trimStart()
- Go to Parent Layer JavaScript String Reference Manual