[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Infinity [Back]  [Original]

Infinity - JavaScript | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

Infinity

Baseline Widely available

This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 7.

Infinity .

In this article

const maxNumber = Math.pow(10, 1000); // Max positive number

if (maxNumber === Infinity) {
  console.log("Let's call it Infinity!");
  // Expected output: "Let's call it Infinity!"
}

console.log(1 / maxNumber);
// Expected output: 0

Number.POSITIVE_INFINITY .

Property attributes of Infinity

Infinity . , .

Infinity( ) . . Number.POSITIVE_INFINITY .

Infinity

js
console.log(Infinity); /* Infinity */
console.log(Infinity + 1); /* Infinity */
console.log(Math.pow(10, 1000)); /* Infinity */
console.log(Math.log(0)); /* -Infinity */
console.log(1 / Infinity); /* 0 */
console.log(1 / 0); /* Infinity */

Specification
ECMAScript 2027 LanguageSpecification
# sec-value-properties-of-the-global-object-infinity


Web Proxy Viewer  |  New URL  |  Original Page