/

HTML / CSS / JavaScript Tutorial

JavaScript property: constructor

[this page | pdf | back links]

The constructor property (when applied to JavaScript object) returns the constructor function for an object (more precisely a reference to that function, rather than the name of the function. Some common functions returned by this property are:

 

JavaScript variable type

constructor property returns

number

function Number() { [native code]}

string

function String() { [native code]}

boolean

function Boolean() { [native code]}

 


NAVIGATION LINKS
Contents | Prev | Next | JavaScript Objects


Desktop view | Switch to Mobile