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

Infinity - JavaScript | MDN

MDN Web Docs

View in English Always switch to English

Infinity

Baseline

20157

Infinity

const maxNumber = 10 ** 1000; // 

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

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

Number.POSITIVE_INFINITY

Infinity

Infinity

Infinity

Number.POSITIVE_INFINITY

Infinity

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

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


Web Proxy Viewer  |  New URL  |  Original Page