js remove space on ends of string code example
Example 1: js remove space from string
string.split(" ").join("")
Example 2: remove space from string javascript
var str = " Hello World! ";
alert(str.trim());
string.split(" ").join("")
var str = " Hello World! ";
alert(str.trim());