What Is the Global Property Infinity?

In JavaScript, the global property Infinity represents a numeric value of infinity. This article provides examples of its usage. This infinity behaves slightly differently than the mathematical infinity most people are accustomed to. Some positive and negative infinities can be used in math calculations; however, sometimes, using infinity in calculations may result in NaN (Not-a-Number), so understanding the rules for working with Infinity is important.

Try It

The Infinity global property is a numeric value representing infinity.