HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <p>Click the button to return the function that created the RegExp object's prototype.</p> <button onclick="myFunction()">Click me</button> <p id="point"></p> <script> function myFunction(){ var myRegExp = new RegExp("p1q6", "gi"); var result = myRegExp.constructor; document.getElementById("point").innerHTML = result; } </script> </body> </html>
OUTPUT
×

Save as Private