## 概述

`Number.MAX_VALUE` 属性表示在 JavaScript 里所能表示的最大数值。

`Number.MAX_VALUE` 属性的属性特性：
writable | false
enumerable | false
configurable | false

## 描述

`MAX_VALUE` 属性值接近于 `1.79E+308`。大于 `MAX_VALUE` 的值代表 "`Infinity`"。

因为 `MAX_VALUE` 是 `Number` 对象的一个静态属性，所以你应该直接使用`Number.MAX_VALUE` ，而不是作为一个创建的 `Number` 实例的属性。

## 示例

### 例子：使用 `MAX_VALUE`

下面的代码求两个数值的乘积。如果结果小于等于 `MAX_VALUE`，则调用 `func1` 函数；否则，调用 `func2` 函数。

    if (num1 * num2 <= Number.MAX_VALUE) {
       func1();
    } else {
       func2();
    }

## 规范

规范版本 | 规范状态 | 注解
--- | --- | ---
ECMAScript 1st Edition. Implemented in JavaScript 1.1 | Standard | Initial definition.
ECMAScript 5.1 (ECMA-262) Number.MAX_VALUE | Standard |
ECMAScript 2015 (6th Edition, ECMA-262) Number.MAX_VALUE | Standard |

## 浏览器兼容性

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

- Desktop
- Mobile

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)

## 相关链接

- `Number.MIN_VALUE`