View Source... The replace() method is used to replace some characters with some other characters in a string; it is case sensitive.