.replace()
Term side of the Card
Topic: String
Unit title: .replace()
Categories: Method
Explanation side of the Card
Explanation: The method that replaces the first occurrence of a substring or a match of a regular expression with a specified replacement string. If the pattern is a regular expression with the global `g` flag, it replaces all matches. It returns a new string with the applied replacements.
Browser compatibility:
- The chrome browser supports this feature starting from version 1
- The edge browser supports this feature starting from version 12
- The firefox browser supports this feature starting from version 1
- The safari browser supports this feature starting from version 1
Availability: