JavaScript String trimEnd()
- Page précédente trim()
- Page suivante trimStart()
- Retour au niveau supérieur Manuel de référence JavaScript String
Definition and usage
trimEnd()
The method removes spaces from the end of the string.
trimEnd()
The method does not change the original string.
trimEnd()
The way the method works is 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
Since January 2020, all browsers support JavaScript String trimEnd()
:
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome 66 | Edge 79 | Firefox 61 | Safari 12 | Opera 50 |
2018 年 4 月 | Janvier 2020 | Juin 2018 | Septembre 2018 | Mai 2018 |
- Page précédente trim()
- Page suivante trimStart()
- Retour au niveau supérieur Manuel de référence JavaScript String