delete all space in string js code example
Example 1: remove all spaces from a string javascript
.replace(/ /g,'')
Example 2: remove space from string javascript
var str = " Hello World! ";
alert(str.trim());
.replace(/ /g,'')
var str = " Hello World! ";
alert(str.trim());