Trimming strings in Javascript

trimStart removes whitespace from the start of a string. trimLeft does the same. And trimEnd removes it from the end. trimRight does the same. trim removes whitespace from both ends.