English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
TheconstructorThe property returns a reference to the prototype function of the creation example.
For JavaScript Date, the constructor property returnsFunction Date(){[native code]}.
For JavaScript Boolean, the constructor property returnsFunction Boolean(){[native code]}.
For JavaScript Array, the constructor property returnsFunction Array(){[native code]}.
For JavaScript Number, the constructor property returnsFunction Number(){[native code]}.
For JavaScript Strig , the constructor property returnsFunction String(){[native code]}.
date.constructor
var d = new Date(); d.constructor;Test and See‹/›
All browsers fully support the Constructor property:
Properties | |||||
constructor | Yes | Yes | Yes | Yes | Yes |
Return Value: | Returns the function that created the object example, i.e.Function Date(){[native code]} |
---|---|
JavaScript Version: | ECMAScript 1 |