What is the correct method to replace all occurrences of "Foo" with "Bar" in the following statement? var mystring = "Replace Foo with Bar at Foo and Foo.";
Correct Answer: var replacedString = mystring.replace(/Foo/g,"Bar");
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More JavaScript MCQ Questions