Below is the example of the Infinity Property.
The Infinity Property used to display Infinity when the floating point number’s upper limit is exceeded and -Infinity when the floating point number’s lower limit is exceeded. Here, Infinity denotes Positive Infinity and -Infinity represents Negative Infinity.
floating point no.
Return Value: It returns Infinity to represent Positive Infinity and -Infinity to represent Negative Infinity.
More example code for the above property are as follows:
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.