constructor  String  instance property JS Home  <<  JS Reference  <<  String  <<  constructor

Description

Returns a reference to the function that created the prototype.

Syntax

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

Parameters

None.

Examples

The code below displays the prototype function of String.


aString = new String('happychappy');

alert('String constructor is ' + String.constructor);

Press the button below to action the above code:

Related Tutorials

JavaScript Basic Tutorials - Lesson 8 - Strings