Q. Which method replaces a substring?
Solution:
replace() replaces a substring, e.g., ‘hi hi’.replace(‘hi’, ‘hello’) = ‘hello hello’.
Get Question Bank
Strengthen Your Practice with our comprehensive question bank.
replace() replaces a substring, e.g., ‘hi hi’.replace(‘hi’, ‘hello’) = ‘hello hello’.
Strengthen Your Practice with our comprehensive question bank.