JavaScript Strings
The trim() Method
trim() removes whitespace from both sides of a string:
Hello World!
Hello World!