JavaScript String replace() method

The JavaScript string replace() method eliminates a given string with the specified replacement. By default, it will replace the first match only. To replace all matches we have to use a global identifier. Syntax: string.replace(string1, string2) Parameters: string1: It represents the string to be searched and replaced. string2: It represents the new string that will … Read more