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