Vidyalelo
JavaScript · Q37

Classes And Modules

Programming · JavaScript · question 37

Q37

The method that performs the search-and-replace operation to strings for pattern matching is

A.
searchandreplace()
B.
add()
Answer
C.
edit()
D.
replace()

Answer: Option B

Solution

Answer: Option B
Solution:
The replace() method performs a search-and-replace operation. It takes a regular expression as its first argument and a replacement string as its second argument.