MCQs > IT & Programming > JavaScript > Correct regular expression to replace Mango with Apple in a string: var str = 'Eat Mango!';

JavaScript MCQs

What is the correct regular expression to replace Mango with Apple in a string: var str = "Eat Mango!";

Answer

Correct Answer: var res = str.replace(/mango/i, "apple");

Explanation:

Note: This Question is unanswered, help us to find answer for this one

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it