does replace method in javascript replaces the original text in main string code example Example: str replace javascript all str.replace(/abc/g, '');