Number.isInteger() Is it an integer
Last updated: 2026-09-09
Number.isInteger() Is it an integer
Number.isInteger checks whether a value is an integer.
| Category | Numbers |
|---|---|
| ES version | ES2015 |
📝 Syntax
Number.isInteger(value);
⚙️ Parameters
| value | The value to check. |
|---|
Returns:A boolean.
Mutates the original:No (returns a new value)
▶ Example
Edit the code, press Run, and see the result in the output panel:
Output:
true
false
false
false
💡 Tip Static method — call as Number.isInteger(x).
ℹ️ info Infinity is not an integer (returns false).
🌐 Browser support
| Browser | |||||
|---|---|---|---|---|---|
| Number.isInteger() | ✓ v34 | ✓ v12 | ✓ v32 | ✓ v9 | ✓ v21 |
| Supported by all modern browsers | |||||
🏷️ Related Items
💡 Related Cases
More case studies coming soon — check back later.
📚 Related Tutorials
❓ FAQ
QStatic or instance method?
AStatic — on the Number constructor.
QCan it distinguish 42 from 42.0?
ANo — 42.0 is 42 in JS, both return true.
QDoes the string '42' return true?
ANo — no type coercion; strings return false.