developer.mozilla.org Open in urlscan Pro
2600:9000:225e:c600:2:eb5:8c00:93a1  Public Scan

Submitted URL: https://mdn.io/Number/isFinite
Effective URL: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite
Submission: On December 29 via api from US — Scanned from DE

Form analysis 1 forms found in the DOM

/en-US/search

<form action="/en-US/search" role="search" aria-haspopup="listbox" aria-owns="top-nav-search-menu" aria-expanded="false" class="search-form search-widget" id="top-nav-search-form"><label id="top-nav-search-label" for="top-nav-search-input"
    class="visually-hidden">Search MDN</label><input id="top-nav-search-input" aria-autocomplete="list" aria-controls="top-nav-search-menu" aria-labelledby="top-nav-search-label" autocomplete="off" type="search" class="search-input-field" name="q"
    placeholder="   " required="" value=""><button type="button" class="button action has-icon clear-search-button"><span class="button-wrap"><span class="icon icon-cancel "></span><span class="visually-hidden">Clear search
        input</span></span></button><button type="submit" class="button action has-icon search-button"><span class="button-wrap"><span class="icon icon-search "></span><span class="visually-hidden">Search</span></span></button>
  <div id="top-nav-search-menu" role="listbox" aria-labelledby="top-nav-search-label"></div>
</form>

Text Content

 * Skip to main content
 * Skip to search
 * Skip to select language

MDN Plus now available in your country! Support MDN and make it your own. Learn
more ✨


MDN Web DocsOpen main menu
 * ReferencesReferences
   * Overview / Web Technology
     
     Web technology reference for developers
   
   * HTML
     
     Structure of content on the web
   
   * CSS
     
     Code used to describe document style
   
   * JavaScript
     
     General-purpose scripting language
   
   * HTTP
     
     Protocol for transmitting web resources
   
   * Web APIs
     
     Interfaces for building web applications
   
   * Web Extensions
     
     Developing extensions for web browsers
   
   * Web Technology
     
     Web technology reference for developers
 * GuidesGuides
   * Overview / MDN Learning Area
     
     Learn web development
   
   * MDN Learning Area
     
     Learn web development
   
   * HTML
     
     Learn to structure web content with HTML
   
   * CSS
     
     Learn to style content using CSS
   
   * JavaScript
     
     Learn to run scripts in the browser
   
   * Accessibility
     
     Learn to make the web accessible to all
 * MDN PlusMDN Plus
   * Overview
     
     A customized MDN experience
   
   * 
     New feature
     Updates
     
     All browser compatibility updates at a glance
   
   * Documentation
     
     Learn how to use MDN Plus
   
   * FAQ
     
     Frequently asked questions about MDN Plus

Search MDNClear search inputSearch

Theme
 * Already a subscriber?
 * Get MDN Plus

 1. References
 2. JavaScript
 3. JavaScript
 4. Standard built-in objects
 5. Number
 6. Number.isFinite()

Article Actions
 * English (US)


IN THIS ARTICLE

 * Try it
 * Syntax
 * Examples
 * Specifications
 * Browser compatibility
 * See also

RELATED TOPICS

 1.  Standard built-in objects
 2.  Number
 3.  Properties
      1. Number.EPSILON
      2. Number.MAX_SAFE_INTEGER
      3. Number.MAX_VALUE
      4. Number.MIN_SAFE_INTEGER
      5. Number.MIN_VALUE
      6. Number.NaN
      7. Number.NEGATIVE_INFINITY
      8. Number.POSITIVE_INFINITY

 4.  Methods
      1.  Number.isFinite()
      2.  Number.isInteger()
      3.  Number.isNaN()
      4.  Number.isSafeInteger()
      5.  Number.parseFloat()
      6.  Number.parseInt()
      7.  Number.prototype.toExponential()
      8.  Number.prototype.toFixed()
      9.  Number.prototype.toLocaleString()
      10. Number.prototype.toPrecision()
      11. Number.prototype.toString()
      12. Number.prototype.valueOf()

 5.  Inheritance:
 6.  Function
 7.  Properties
      1. Non-standard Deprecated Function.prototype.arguments
      2. Non-standard Deprecated Function.prototype.caller
      3. Non-standard Function.prototype.displayName
      4. Function.prototype.length
      5. Function.prototype.name
      6. Function.prototype.prototype

 8.  Methods
      1. Function.prototype.apply()
      2. Function.prototype.bind()
      3. Function.prototype.call()
      4. Function.prototype.toString()

 9.  Object
 10. Properties
      1. Object.prototype.constructor
      2. Deprecated Object.prototype.__proto__

 11. Methods
      1.  Deprecated Object.prototype.__defineGetter__()
      2.  Deprecated Object.prototype.__defineSetter__()
      3.  Deprecated Object.prototype.__lookupGetter__()
      4.  Deprecated Object.prototype.__lookupSetter__()
      5.  Object.prototype.hasOwnProperty()
      6.  Object.prototype.isPrototypeOf()
      7.  Object.prototype.propertyIsEnumerable()
      8.  Object.setPrototypeOf()
      9.  Object.prototype.toLocaleString()
      10. Object.prototype.toString()
      11. Object.prototype.valueOf()


IN THIS ARTICLE

 * Try it
 * Syntax
 * Examples
 * Specifications
 * Browser compatibility
 * See also


NUMBER.ISFINITE()

The Number.isFinite() method determines whether the passed value is a finite
number — that is, it checks that a given value is a number, and the number is
neither positive Infinity, negative Infinity, nor NaN.


TRY IT




SYNTAX

Number.isFinite(value)


Copy to Clipboard


PARAMETERS

value

The value to be tested for finiteness.


RETURN VALUE

The boolean value true if the given value is a finite number. Otherwise false.


EXAMPLES




USING ISFINITE()

Number.isFinite(Infinity); // false
Number.isFinite(NaN); // false
Number.isFinite(-Infinity); // false

Number.isFinite(0); // true
Number.isFinite(2e64); // true


Copy to Clipboard


DIFFERENCE BETWEEN NUMBER.ISFINITE() AND GLOBAL ISFINITE()

In comparison to the global isFinite() function, this method doesn't first
convert the parameter to a number. This means only values of the type number and
are finite return true, and non-numbers always return false.

isFinite('0'); // true; coerced to number 0
Number.isFinite("0"); // false
isFinite(null); // true; coerced to number 0
Number.isFinite(null); // false


Copy to Clipboard


SPECIFICATIONS

SpecificationECMAScript Language Specification
# sec-number.isfinite


BROWSER COMPATIBILITY

Report problems with this compatibility data on GitHub

desktopmobileserver
Chrome

Edge

Firefox

Opera

Safari

Chrome Android

Firefox for Android

Opera Android

Safari on iOS

Samsung Internet

WebView Android

Deno

Node.js

isFinite
Full support
Chrome19
Toggle history
Full support
Edge12
Toggle history
Full support
Firefox16
Toggle history
Full support
Opera15
Toggle history
Full support
Safari9
Toggle history
Full support
Chrome Android25
Toggle history
Full support
Firefox for Android16
Toggle history
Full support
Opera Android14
Toggle history
Full support
Safari on iOS9
Toggle history
Full support
Samsung Internet1.5
Toggle history
Full support
WebView Android4.4
Toggle history
Full support
Deno1.0
Toggle history
Full support
Node.js0.10.0
Toggle history


LEGEND

Tip: you can click/tap on a cell for more information.

Full supportFull support
The compatibility table on this page is generated from structured data. If you'd
like to contribute to the data, please check out
https://github.com/mdn/browser-compat-data and send us a pull request.


SEE ALSO

 * Polyfill of Number.isFinite in core-js
 * The Number object it belongs to
 * The global function isFinite


FOUND A PROBLEM WITH THIS PAGE?

 * Edit on GitHub
 * Source on GitHub
 * Report a problem with this content on GitHub
 * Want to fix the problem yourself? Learn how to contribute!

Last modified: Dec 13, 2022, by MDN contributors

MDN logo

Your blueprint for a better internet.

 * MDN on Twitter
 * MDN on GitHub


MDN

 * About
 * Hacks Blog
 * Careers


SUPPORT

 * Product help
 * Report an issue


OUR COMMUNITIES

 * MDN Community
 * MDN Forum
 * MDN Chat


DEVELOPERS

 * Web Technologies
 * Learn Web Development
 * MDN Plus

Mozilla logo
 * Website Privacy Notice
 * Cookies
 * Legal
 * Community Participation Guidelines

Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2022 by individual mozilla.org contributors.
Content available under a Creative Commons license.