Loading Please Wait...
JavaScript provides the following number properties that can be used on all JavaScript numbers:
Number.EPSILON is the difference between the smallest floating point number greater than 1 and expressions):
let a = Number.EPSILON; // a = 2.220446049250313e-16
Number.MAX_VALUE is a constant representing the largest possible number in JavaScript.
let a = Number.MAX_VALUE; // a = 1.7976931348623157e+308
Number.MIN_VALUE is a constant representing the lowest possible number in JavaScript.
let a = Number.MIN_VALUE; // a = 5e-324
Number.MAX_SAFE_INTEGER represents the maximum safe integer in JavaScript. Number.MAX_SAFE_INTEGER is (253 - 1).
let a = Number.MAX_SAFE_INTEGER; // a = 9007199254740991
Number.MIN_SAFE_INTEGER represents the minimum safe integer in JavaScript. Number.MIN_SAFE_INTEGER is -(253 - 1).
let a = Number.MIN_SAFE_INTEGER; // a = -9007199254740991
Number.POSITIVE_INFINITY represents the Infinity. POSITIVE_INFINITY is returned on overflow:
let a = Number.POSITIVE_INFINITY; // a = Infinity
let b = 1 / 0; // b = Infinity
Number.NEGATIVE_INFINITY represents the Negative Infinity. NEGATIVE_INFINITY is returned on overflow:
let a = Number.NEGATIVE_INFINITY; // a = -Infinity
let b = -1 / 0; // b = -Infinity
NaN is a JavaScript reserved word for a number that is not a legal number.
let a = Number.NaN; // a = Nan
let b = 100 / "Apple"; // b = NaN
let a = 6;
let b = a.MAX_VALUE; // b = undefined
How you feel about this blog:
Share this blog on:
If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com
Contact UsWe are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..
Copyright ©
, Lynxsia IT Solutions, All rights reserved