String.prototype.trimStart

Returns a string where all whitespace characters have been removed from the beginning of the string.

Syntax

trimStart()

Return value

A string with leading whitespace removed.

Examples

"  hello  ".trimStart()
"hello  "