The top-level function, isFinite, is used to determine if the argument, testnumber, is a finite and legal number. This function returns true for a finite number and otherwise returns false.
document.write(isFinite(2.2345))
true
document.write(isFinite(2.5E+345))
false
document.write(isFinite("Ima string"))
false