JS Tutorial



JS NUMBER PROPERTIES


JavaScript Number Properties

JavaScript provides several built-in properties for the Number object. These properties are constants that can be used to work with numerical values in JavaScript. Let's explore some of these important properties:

🔹 Key JavaScript Number Properties:
  • MAX_VALUE – The largest positive number that JavaScript can handle
  • MIN_VALUE – The smallest positive number that JavaScript can handle
  • POSITIVE_INFINITY – Represents positive infinity
  • NEGATIVE_INFINITY – Represents negative infinity
  • NaN – Represents "Not-a-Number"

📌 MAX_VALUE

MAX_VALUE is a constant representing the largest positive number that JavaScript can handle.

Example: The Largest Positive Number

📌 MIN_VALUE

MIN_VALUE is a constant representing the smallest positive number that JavaScript can handle.

Example: The Smallest Positive Number

📌 POSITIVE_INFINITY

POSITIVE_INFINITY is a constant representing the positive infinity value in JavaScript.

Example: Check for Positive Infinity

📌 NEGATIVE_INFINITY

NEGATIVE_INFINITY is a constant representing the negative infinity value in JavaScript.

Example: Check for Negative Infinity

📌 NaN

NaN represents "Not-a-Number", a special value used when a mathematical operation results in an undefined or unrepresentable value.

Example: Check for NaN

📌 Try It Yourself

Click the buttons below to see the results of various JavaScript number properties in action:

📘 Summary:
JavaScript number properties help you work with numeric values. You can access constants like MAX_VALUE, MIN_VALUE, POSITIVE_INFINITY, NEGATIVE_INFINITY, and NaN to deal with various special numeric cases.

🌟 Enjoyed Learning with Us?

Help others discover Technorank Learning by sharing your honest experience.
Your support inspires us to keep building!

Leave a Google Review