diff --git a/guide/english/javascript/standard-objects/string/string-prototype-trimleft/index.md b/guide/english/javascript/standard-objects/string/string-prototype-trimleft/index.md index 3784707e83..e9fcb79af7 100644 --- a/guide/english/javascript/standard-objects/string/string-prototype-trimleft/index.md +++ b/guide/english/javascript/standard-objects/string/string-prototype-trimleft/index.md @@ -3,13 +3,15 @@ title: String.prototype.trimLeft --- ## String.prototype.trimLeft -This is a stub. Help our community expand it. +The `trimLeft()` function removes any whitespace characters from the start (the left side) of a given string. It returns a new string. It does not modify the original string. -This quick style guide will help ensure your pull request gets accepted. +Examples: +```js +" This string has two spaces at the beginning and a tab and two spaces at the end. ".trim(); +// output: "This string has two spaces at the beginning and a tab and two spaces at the end. " +``` - +Note - `trimLeft()` removes any whitespace character, not just spaces or tabs. #### More Information: - - - +- [String.prototype.trimLeft() on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimStart)