From 4606509d9cff432c193056c7a5c7d8a949218599 Mon Sep 17 00:00:00 2001 From: Thomas Abbott <43638735+abbotttp@users.noreply.github.com> Date: Fri, 21 Dec 2018 09:56:03 +0000 Subject: [PATCH] fix: update JavaScript string.prototype.trimleft article from stub (#25981) * fix: update JavaScript string.prototype.trimleft article from stub * Removed extra characer --- .../string/string-prototype-trimleft/index.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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)