While JavaScript can cover a really big range of numbers by using floating point there are still limits. Numbers that become too small to be able to express are converted to zero since theyt are so close to that as to make no difference. JavaScript provides Infinity as the value that will be used if the number is too big to be expressed as a floating point value. The largest value JavaScript can express using floating point is 1.7976931348623157E+10308 so anything bigger than that will be Infinity.
We can't actually perform any calculations using Infinity even though it is a number and so JavaScript provides the isFinite function to allow us to test if the number is Infinity prior to trying ti use it in a calculation.
This function tests both that the value is a number and that the number isn't Infinity or -Infinity. It returns true if the value is a finite number and so can make for easier to read code than using isNaN where you know the number isn't going to be Infinity.
var googol, str;
str = '+1.0e+100';
if (isFinite(str))
googol = parseFloat(str);
