remove spaces from string nodejs code example
Example 1: remove all spaces from a string javascript
.replace(/ /g,'')
Example 2: javascript remove space from string
const removeSpaces = str => str.replace(/\s/g, '');
// Example
removeSpaces('hel lo wor ld'); // 'helloworld'