`Number.isInteger()` 方法用来判断给定的参数是否为整数。

## 语法

    Number.isInteger(value)

### 参数

`value`
  要判断此参数是否为整数

### 返回值

判断给定值是否是整数的 `Boolean` 值。

## 描述

如果被检测的值是整数，则返回 `true`，否则返回 `false`。注意 `NaN` 和正负 `Infinity` 不是整数。

## 示例

    Number.isInteger(0);         // true
    Number.isInteger(1);         // true
    Number.isInteger(-100000);   // true

    Number.isInteger(0.1);       // false
    Number.isInteger(Math.PI);   // false

    Number.isInteger(Infinity);  // false
    Number.isInteger(-Infinity); // false
    Number.isInteger("10");      // false
    Number.isInteger(true);      // false
    Number.isInteger(false);     // false
    Number.isInteger([1]);       // false

## Polyfill

    Number.isInteger = Number.isInteger || function(value) {
        return typeof value === "number" &&
               isFinite(value) &&
               Math.floor(value) === value;
    };

## 规范

规范名称 | 规范状态 | 备注
--- | --- | ---
ECMAScript 2015 (6th Edition, ECMA-262) Number.isInteger | Standard | Initial definition.
ECMAScript Latest Draft (ECMA-262) Number.isInteger | 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!

- Desktop
- Mobile

Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari
--- | --- | --- | --- | --- | ---
Basic support | (Yes) | 16 (16) | 未实现 | (Yes) | (Yes)

Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile
--- | --- | --- | --- | --- | --- | ---
Basic support | 未实现 | 未实现 | 16.0 (16) | 未实现 | 未实现 | 未实现

## 相关链接

- `Number`