Monday, November 18, 2024
Google search engine
HomeLanguagesJavascriptJavaScript Number constructor Property

JavaScript Number constructor Property

JavaScript Number constructor Property is used to return the number constructor function for the object. The function which is returned by this property is just the reference to this function, not a number containing the function’s name. The JavaScript number constructor, string constructor, and boolean constructor return function Number() { [native code] }, function String() { [native code] }, and function Boolean() { [native code] } respectively.

Syntax:

number.constructor

Values: This property does not have any value.

Return Value: It returns function Number() { [native code] }

Example 1:

Javascript




let num = 444;
console.log(num.constructor);


Output:  

function Number() { [native code] }

Example 2: 

Javascript




let num = 44.44;
console.log(num.constructor);


Output: 

function Number() { [native code] }

Supported Browsers: 

  • Google Chrome 6.0 and above
  • Internet Explorer 9.0 and above
  • Mozilla 4.0 and above
  • Opera 11.1 and above
  • Safari 5.0 and above

We have a complete list of JavaScript Number constructor, properties, and methods list, to know more about the numbers please go through that article.

Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!

RELATED ARTICLES

Most Popular

Recent Comments