constructor  RegExp  instance property JS Home  <<  JS Reference  <<  RegExp  <<  constructor

Description

Returns a reference to the function that created the prototype.

Syntax

Signature Description
aRegExp.constructorReturns a reference to the function that created the prototype.

Parameters

None.

Examples

The code below displays prototype function of RegExp.


var aRegExp = /\d/;
  
alert('RegExp constructor is ' + aRegExp.constructor);

Press the button below to action the above code:

Related Tutorials

JavaScript Intermediate Tutorials - Lesson 9 - Regular Expressions

JavaScript Basics

JavaScript Basics

JavaScript Intermediate

JavaScript Intermediate

JavaScript Advanced

JavaScript Advanced

JavaScript Reference

JavaScript Entities

Globals

RegExp

Class Properties
prototype
Instance Properties
constructor
global
ignoreCase
lastIndex
multiline
source
Class Methods
None.
Instance Methods Getters
exec()
test()
toString()
Instance Methods Setters
None.

Statements

Operators