remove anywhite space in a string javascript code example
Example 1: remove all spaces from a string javascript
.replace(/ /g,'')
Example 2: remove whitespace javascript
var str = " Some text ";
str.trim();
.replace(/ /g,'')
var str = " Some text ";
str.trim();