Reference Materials
Certification Courses
Created with over a decade of experience and thousands of feedback.
Python online compiler
JavaScript online compiler
SQL online compiler
Java online compiler
HTML online compiler
C online compiler
C++ online compiler
C# online compiler
PHP online compiler
Swift online compiler
Kotlin online compiler
TypeScript online compiler
Go online compiler
Rust online compiler
Scala online compiler
Dart online compiler
R online compiler
Ruby online compiler
JavaScript Number.POSITIVE_INFINITY
The Number.POSITIVE_INFINITY property represents the positive infinity value.
The value of POSITIVE_INFINITY is the same as the global object's Infinity property. It is the value that is greater than any number in JavaScript.
It is a non-writable, non-enumerable, and non-configurable property.
The syntax to access the POSITIVE_INFINITY property is:
Number.POSITIVE_INFINITY
POSITIVE_INFINITY is accessed using the Number class name.
Example: Using Number.POSITIVE_INFINITY
value = Number.POSITIVE_INFINITY;
console.log(value); // Infinity
Output
Infinity
Note: JavaScript displays the POSITIVE_INFINITY value as Infinity.
Recommended Reading:
Did you find this article helpful?