Javascript Trim() Function

The trim() function of string object removes whitespace from both ends of a string. Use it for example to removes whitespace from both ends.

Syntax

Javascript Trim() Function Example