Copyright © tutorialspoint.com

# Javascript RegExp - constructor Property

## Description:

This returns a reference to the array function that created the instance's prototype.

## Syntax:

    RegExp.constructor

Here is the detail of parameters:

- NA

## Return Value:

Returns the function that created this object's instance.

## Example:

    <html>
    <head>
    <title>JavaScript RegExp constructor Property</title>
    </head>
    <body>
    <script type="text/javascript">
       var re = new RegExp( "string" );
       document.write("re.constructor is:" + re.constructor);
    </script>
    </body>
    </html>

This will produce following result:

    re.constructor is: function RegExp() { [native code] }

To understand it in better way you can Try it yourself.

Copyright © tutorialspoint.com