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.
str.trimStart() removes whitespace from the start (left side) of a string only.
Challenge: Implement trimLeft(str) that removes leading whitespace.
trimLeft(' hello') // β 'hello'