<html> <head> <title>Using the replace() method of the String object</title> <script type="text/javascript" language="javascript"> <!-- // var originalString = "A ab abc abcd"; var replacedString = "a"; var replacementString = "z";
var newString = originalString.replace(replacedString, replacementString);