
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
How to create a Number object using JavaScript?
The Number object represents a numerical date, either integers or floating-point numbers. The syntax for creating a number object is as follows −
var val = new Number(number);
The Number object without the new operator can be used to perform a type conversion. Let’s see an example of Number.MAX_VALUE property. The Number.MAX_VALUE property belongs to the static Number object.
Example
<html> <head> <script> <!-- function showValue() { var val = Number.MAX_VALUE; document.write ("Value of Number.MAX_VALUE : " + val ); } //--> </script> </head> <body> <p>Click the following to see the result:</p> <form> <input type="button" value="Click Me" onclick="showValue();" /> </form> </body> </html>
- Related Articles
- How to create a URL object using JavaScript?
- How to create JavaScript objects using object() constructor?
- How to create a multidimensional JavaScript object?
- How to create a Boolean object in JavaScript?
- How to create a custom object in JavaScript?
- How to create a Date object in JavaScript?
- How to create a JSON Object using Object Model in Java?
- How to create a new object with only a subset of properties using vanilla Javascript
- How to create RegExp object in JavaScript?
- How to create object properties in JavaScript?
- How to create a cloned image object using FabricJS?
- How to create an Object representation of a Line object using FabricJS?
- How to create a third object from two objects using the key values in JavaScript?
- How to create a bold text using JavaScript?
- How to create a strikethrough text using JavaScript?

Advertisements