how to remove all the spaces in the string javasript code example Example: remove all spaces from a string javascript .replace(/ /g,'')