replace char string js code example Example: js replace characters in a string var str = "Original string!"; var str = str.replace("Original", "New");