JavaScript & jQuery Tutorials

JS Home Right Arrow JS Reference Right Arrow String Right Arrow constructor

constructor  String  instance property

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



  

go to home page Homepage go to top of page Top