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