JavaScript String trim() method : The trim() method is used to trim the unwanted extra space from both sides (left and right). It returns the new string without having the white-space on both sides.
The trimStart() method of String values removes whitespace from the beginning of the string and returns a new string without modifying the original. It is equivalent to the trimLeft() method and is ...