how to remove the rest of a string at a specific symbol javascript code example Example: javascript remove character from string mystring.replace(/r/g, '')