Last Updated : 23 Jul, 2025
The JavaScript isFinite() function is used to check whether a number is a finite, legal number or not. It returns true for all the values except +infinity, -infinity, or NaN.
Syntax:
isFinite(value)
Parameters: This method takes a single parameter as mentioned above and discussed below:
Return Value: It returns a Boolean value i.e. returns false if the value is +infinity, -infinity, or NaN, otherwise returns true.
Example: In this example, we will check for some numbers if they are finite or not using the isFinite() function of javascript.
JavaScript
<script>
console.log(isFinite(12));
console.log(isFinite(0));
console.log(isFinite(12.3));
console.log(isFinite("Geeks"));
console.log(isFinite("456"));
console.log(isFinite(-46));
</script>
Output:
true true true false true true
We have a complete list of Javascript Functions, to check those please go through this Javascript Function Complete reference article.
Supported Browsers:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4