JavaScript constructorProperty

Number 对象参考手册JavaScript Number Object

Examples

Returns a reference to the Number function that created this object:

num.constructor;

Output:

function Number() { [native code] }

Try it Yourself »

Definition and Usage

The constructor property returns a reference to the Boolean function that created this object.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the constructor property.


Syntax

number.constructor

Technical Details

Return value: Function object. A reference to the Number function that created this object.
JavaScript Version: 1.1


Number 对象参考手册JavaScript Number Object

Other Extensions