JavaScript RegExp - constructor



Description

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

Syntax

Its syntax is as follows −

RegExp.constructor

Return Value

Returns the function that created this object's instance.

Example

Following example shows usage of RegExp expression.

   
   
      JavaScript RegExp constructor Property
   
   
         
            
   

Output

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