node js remove all spaces in string code example Example: remove all spaces from a string javascript .replace(/ /g,'')