Number.MIN_SAFE_INTEGER 代表在 JavaScript中最小的安全的integer型数字 (-(253 - 1)).

Number.MIN_SAFE_INTEGER 属性的属性特性:
writable false
enumerable false
configurable false

描述

MIN_SAFE_INTEGER 的值是-9007199254740991. 形成这个数字的原因是 JavaScript 在 IEEE 754中使用double-precision floating-point format numbers 作为规定。在这个规定中能安全的表示数字的范围在-(253 - 1) 到 253 - 1之间.

由于MIN_SAFE_INTEGER 是Number的一个静态属性,你可以直接使用Number.MIN_SAFE_INTEGER, r而不是自己去创建一个Number的属性。 

示例

Number.MIN_SAFE_INTEGER // -9007199254740991
-(Math.pow(2, 53) - 1)  // -9007199254740991

规范

Specification Status Comment
ECMAScript 2015 (6th Edition, ECMA-262)
Number.MIN_SAFE_INTEGER
Standard Initial definition.
ECMAScript Latest Draft (ECMA-262)
Number.MIN_SAFE_INTEGER
Draft  

浏览器支持

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!
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 34 31 (31) 未实现 (Yes) 未实现
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) (Yes) 32.0 (32) 未实现 未实现 未实现

参阅