The primitive value Infinity represents the positive infinite number value.
If you are in an environment that does not have the Infinity value implemented, then you may be able to create one yourself like this:
var Infinity = 1e300 * 1e300;
You can check for infinity values with Number.POSITIVE_INFINITY and Number.NEGATIVE_INFINITY. They should be identical to Infinity and -Infinity which are properties of the Global object.
Note that although the type of result when testing the value Infinity or the copies available from the Number object is number, the value will print as "Inf" when displayed with a document.write() method.
This constant is available as a property of the Global object in MSIE version 4 but not in Netscape 4.
This is not available for use server-side with Netscape Enterprise Server 3.
Note that you can assign a new value to the Infinity property on some browsers. This is somewhat dangerous and may cause unpredictable results later on.
ECMA 262 edition 2 - section - 4.3.22
ECMA 262 edition 2 - section - 220.127.116.11
ECMA 262 edition 3 - section - 4.3.22
ECMA 262 edition 3 - section - 18.104.22.168