JavaScript: Number.isFinite

By Xah Lee. Date: . Last updated: .
Number.isFinite( number )
  1. If Type of number is not number, return false.
  2. If number is NaN or +Infinity or -Infinity, return false.
  3. Else, return true.
console.log( Number.isFinite ( 3 ) ); // true
console.log( Number.isFinite ( 3.4 ) ); // true

console.log( Number.isFinite ( "3" ) ); // false
console.log( Number.isFinite ( Infinity ) ); // false
console.log( Number.isFinite ( NaN ) ); // true
JS in Depth
XAH  BUY NOW

JS in Depth

JS Obj Ref

DOM


JS Obj Ref

Number

prototype