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() does NOT touch trailing whitespace β only leading whitespace is removed.
Challenge: Implement trimStartOnly(str) that removes leading but preserves trailing whitespace.
trimStartOnly(' hello ') // β 'hello '