Learn JavaScript
String Methods
17.6
Lesson

Removing Empty Spaces from String

The trim() method removes empty spaces from the beginning and the end of the string.