String.prototype.trimStartbeginner' hello '.trimStart() // β 'hello '
' text'.trimStart() // β 'text'
'hi'.trimStart() // β 'hi'Use trimStart() to remove only leading whitespace from the beginning of a string, leaving trailing whitespace intact.
trimStart() also removes leading tabs.
Challenge: Implement removeLeadingTab(str) that removes a leading tab.
removeLeadingTab('\thello') // β 'hello'