Skip to content

isFinite ​

The isFinite function checks if a value is a finite number.

Syntax ​

typescript
isFinite(value)

Parameters ​

NameTypeDescription
valuenumberValue to be checked.

Return Value ​

TypeDescription
booleantrue if the value is a finite number, else false.

Examples ​

typescript
isFinite(10); // true
isFinite(Infinity); // false
isFinite(NaN); // false

Notes ​

  • Throws a TypeError if the value is not a number.
  • Useful for mathematical validations and limit control.

References ​

Released under the MIT License.