- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are MAX_VALUE and MIN_VALUE in JavaScript?
The Number.MAX_VALUE property belongs to the static Number object. It represents constants for the largest possible positive numbers that JavaScript can work with.
The Number.MIN_VALUE property belongs to the static Number object. It represents constants for the smallest possible positive numbers that JavaScript can work with.
Example
You can try to run the following code to learn about the MAX and MIN value in JavaScript −
<html> <head> <script> function showMinValue() { var val = Number.MIN_VALUE; alert("Value of Number.MIN_VALUE : " + val ); } function showMaxValue() { var val = Number.MAX_VALUE; alert("Value of Number.MAX_VALUE : " + val ); } </script> </head> <body> <p>Click the following to see the result:</p> <form> <input type="button" value="MIN" onclick="showMinValue();" /> <input type="button" value="MAX" onclick="showMaxValue();" /> </form> </body> </html>
- Related Articles
- What are decorators and how are they used in JavaScript?
- What Are Whitespace and Line Breaks in JavaScript?
- What are JavaScript Classes and Proxies?
- What are events in JavaScript?
- What are Comments in JavaScript?
- What are operators in JavaScript?
- What are cookies in JavaScript?
- What are functions in JavaScript?
- What are Promises in JavaScript?
- What are Closures in JavaScript?
- What are modules in JavaScript?
- What are the differences between mean.io and mean.js in javascript?
- What are the differences between clientHeight() and offsetHeight() in javascript?
- What are Primitive and Non-Primitive Data Types in JavaScript?
- What are JavaScript data types and data structures?

Advertisements