JavaScript Number constructor ɗanɗa

Definition and usage

The constructor property returns the function that creates the Number prototype.

For JavaScript numbers, the constructor property returns:function Number() { [native code] }

Instance

let num = 134.5;
let text = num.constructor;

Try it yourself

Syntax

number.constructor

Return value

function Number() { [native code] }

Browser ke girmuwa

constructor yana aya neba ECMAScript1 (ES1) yau.

所有浏览器都完全支持 ES1 (JavaScript 1997):

Chrome IE Edge Firefox Safari Opera
Chrome IE Edge Firefox Safari Opera
支持 支持 支持 支持 支持 支持