Examveda

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

A. searchandreplace()

B. add()

C. edit()

D. replace()

Answer: Option B

Solution (By Examveda Team)

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.

This Question Belongs to Javascript >> Classes And Modules

Join The Discussion

Comments (1)

  1. Muhammed Mubashshir
    Muhammed Mubashshir:
    6 years ago

    Is the answer Option B or Option D?

Related Questions on Classes and Modules