function that delete spaces js code example
Example: how to remove spaces from strings javascript
var str = '/var/www/site/Brand new document.docx';
document.write( str.replace(/\s/g, '') );
var str = '/var/www/site/Brand new document.docx';
document.write( str.replace(/\s/g, '') );