how to remove all spaces in javascript code example
Example 1: remove all spaces from a string javascript
.replace(/ /g,'')
Example 2: javascript remove all spaces from string
str = str.replace(/\s/g, '');
.replace(/ /g,'')
str = str.replace(/\s/g, '');