Home » JavaScript

Number MAX_VALUE Property with Example in JavaScript

JavaScript Number MAX_VALUE Property: Here, we are going to learn about the MAX_VALUE property of Number in JavaScript with Example.
Submitted by IncludeHelp, on February 08, 2019

Number MAX_VALUE Property

MAX_VALUE Property is a Number property in JavaScript and it is used to get the maximum value of a number that is possible in JavaScript.

Syntax:

    Number.MAX_VALUE;

Note: MAX_VALUE property is called with the "Number", we cannot use this property with a variable. If we use MAX_VALUE with a variable – it returns "undefined".

Examples:

    Input: 
    Number.MAX_VALUE

    Output:
    1.7976931348623157e+308

Code:

<html>
<head>
<title>JavaScipt Example</title>
</head>
<body>
<script>
	document.write("Max. Value: " + Number.MAX_VALUE + "<br>");
	//testing with variable
	var num = 123;
	document.write("num.MAX_VALUE: " + num.MAX_VALUE + "<br>");
</script>
</body>
</html>

Output

Max. Value: 1.7976931348623157e+308
num.MAX_VALUE: undefined





Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.
Learn PCB Designing: PCB DESIGNING TUTORIAL







Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing » Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.