JavaScript String trimStart()
- Previous Page trimEnd()
- Next Page valueOf()
- Go to the Previous Level JavaScript String Reference Manual
Definition and Usage
trimStart()
The method removes spaces from the beginning of the string.
trimStart()
The method does not change the original string.
trimStart()
The way the method works is trim()
Similar, but only removes spaces from the beginning of the string.
Note:trimStart()
The method was added to JavaScript in ECMAScript 2019.
See Also:
Syntax
string.trimStart()
Parameter
No parameters.
Return Value
Type | Description |
---|---|
String | A string that removes spaces from the beginning of the string. |
Browser Support
Starting from January 2020, all browsers support JavaScript String trimStart()
:
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome 66 | Edge 79 | Firefox 61 | Safari 12 | Opera 50 |
2018 April | 2020 January | 2018 June | September 2018 | May 2018 |
- Previous Page trimEnd()
- Next Page valueOf()
- Go to the Previous Level JavaScript String Reference Manual