BASELINE NowYouCanUse.com
Widely Available Strings
id: string-trim-startend

String trimStart() and trimEnd()

The trimStart() and trimEnd() methods of strings return a new string with whitespace removed from the beginning or end of the string.
Baseline Status: Achieved Widely Available on Jul 15, 2022 (Cross-browser Newly Available since Jan 15, 2020).
Desktop Browser Engine Support
Google Chrome
66
Supported
Mozilla Firefox
61
Supported
Apple Safari
12
Supported
Microsoft Edge
79
Supported
Mobile Browser Engine Support
Chrome Android
66
Firefox Android
61
Safari iOS
12
Specifications and References