removing spaces js code example
Example 1: remove space from string javascript
var str = " Hello World! ";
alert(str.trim());
Example 2: javascript whitespace strip
yourvariable.trim()
var str = " Hello World! ";
alert(str.trim());
yourvariable.trim()