var str = " Hello World! ";
alert(str.trim());
var str = '/var/www/site/Brand new document.docx';
document.write( str.replace(/s/g, '') );
var str = " Hello World! ";
alert(str.trim());
var str = '/var/www/site/Brand new document.docx';
document.write( str.replace(/s/g, '') );
const removeSpaces = str => str.replace(/s/g, '');
// Example
removeSpaces('hel lo wor ld'); // 'helloworld'
var str = '/var/www/site/Brand new document.docx';
document.write( str.replace(/s/g, '') );
string.split(" ").join("")
value = value.trim();
var str = " Some text ";
str.trim();