MCQs > IT & Programming > JavaScript > Analyze the following code snippet. What's the output?

JavaScript MCQs

Analyze the following code snippet. What will be the output of this code?

<html>

<body>

 

<script type="text/javascript">

    var str = "Visit Gardens(now)";

    var patt1 = new RegExp("(now)", "g");

    patt1.test(str);

    document.write(RegExp.lastParen);

</script>

 

</body>

</html>

Answer

Correct Answer: now

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