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