substitutes a character in a string js code example Example: str replace javascript all str.replace(/abc/g, '');