Basically Infinity property is a numeric value i.e represent the undefined value .
If the value of infinity is very-very small and negative then it would be negative infinity .
If the value of infinity is very-very large and positive then it would be positive infinity .
Syntax
Infinity
Infinity is a property of the global Object .
Number.POSITIVE_INFINITY -> It is the initial value of Infinity . And when any positive number is multiplied by Infinity then result will also be the Infinity and when we divide infinity then result will be 0 .
Example
console.log( Infinity ) ; // Output : Infinity
console.log( Infinity + 1 ) ; // Output : Infinity
console.log( Infinity -10000000000 ) ; // Output : Infinity
console.log( Infinity *61261261261261212 ) ; // Output : Infinity
console.log( Math.pow(10000000000) ) ; // Output : Infinity
but
console.log( 1 / Infinity ) ; // Output : 0
0 Comment(s)