let text1 = " Hello World! ";
let text2 = text1.trimStart();
The trimStart()
method removes whitespace from the beginning of a string.
The trimStart()
method does not change the original string.
The trimStart()
method works like trim()
, but removes whitespace only from the start of a string.
JavaScript String trimStart()
is supported in all browsers since January 2020:
Track your progress - it's free!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4