MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See whistlepig.mozilla.org for all notifications.

mozilla
Your Search Results

    MIN VALUE Redirect 1

    Summary

    The Number.MIN_VALUE property represents the smallest positive numeric value representable in JavaScript.

    Property attributes of MIN VALUE Redirect 1
    Writable no
    Enumerable no
    Configurable no

    Description

    The MIN_VALUE property is the number closest to 0, not the most negative number, that JavaScript can represent.

    MIN_VALUE has a value of approximately 5e-324. Values smaller than MIN_VALUE ("underflow values") are converted to 0.

    Because MIN_VALUE is a static property of Number, you always use it as Number.MIN_VALUE, rather than as a property of a Number object you created.

    Examples

    Example: Using MIN_VALUE

    The following code divides two numeric values. If the result is greater than or equal to MIN_VALUE, the func1 function is called; otherwise, the func2 function is called.

    if (num1 / num2 >= Number.MIN_VALUE) {
        func1();
    } else {
        func2();
    }

    Specifications

    Specification Status Comment
    ECMAScript 1st Edition. Implemented in JavaScript 1.1 Standard Initial definition.
    ECMAScript Language Specification 5.1th Edition (ECMA-262) Standard  
    ECMAScript Language Specification 6th Edition (ECMA-262) Draft  

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
    Basic support (Yes) (Yes) (Yes) (Yes) (Yes)
    Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
    Basic support (Yes) (Yes) (Yes) (Yes) (Yes) (Yes)

    See also

    Document Tags and Contributors

    Contributors to this page: Sheppy
    Last updated by: Sheppy,