The isFinite()
function determines whether a value is finite, first converting the value to a number if necessary. A finite number is one that's not NaN
or ±Infinity
. Because coercion inside the isFinite()
function can be surprising, you may prefer to use Number.isFinite()
.