aboutsummaryrefslogtreecommitdiff
path: root/files/de/web/javascript/reference/global_objects/infinity/index.html
blob: f862732ec2c43ae7680d7ec47dd00b07eeba9de6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
---
title: Infinity
slug: Web/JavaScript/Reference/Global_Objects/Infinity
tags:
  - JavaScript
translation_of: Web/JavaScript/Reference/Global_Objects/Infinity
---
<div>{{jsSidebar("Objects")}}</div>

<p>Die globale <span class="dpf_sent" id="dpfsent_1">Eigenschaft </span><strong><code>Infinity</code></strong> ist ein <span class="dpf_sent" id="dpfsent_1">numerischer </span>Wert, der die Unendlichkeit repräsentiert.</p>

<p>{{js_property_attributes(0,0,0)}}</p>

<div>{{EmbedInteractiveExample("pages/js/globalprops-infinity.html")}}</div>



<h2 id="Syntax" name="Syntax">Syntax</h2>

<pre class="syntaxbox"><code>Infinity </code></pre>

<h2 id="Description" name="Description">Beschreibung</h2>

<p><code>Infinity</code> ist eine Eigenschaft des <em>globalen Objekts</em>, was bedeutet, dass es eine Variable im globalen Gültigkeitsbereich ist.</p>

<p>Der initiale Wert von <code>Infinity</code> entspricht {{jsxref("Number.POSITIVE_INFINITY")}}. Der Wert von <code>Infinity</code> (positiv unendlich) ist größer als alle anderen Nummern. Mathematisch entspricht der Wert der Unendlichkeit. Zum Beispiel ist das Produkt einer positiven Zahl mit <code>Infinity</code> immer <code>Infinity</code>. Jede Division einer Zahl durch <code>Infinity</code> ergibt 0.</p>

<p>In der ECMAScript 5 Spezifikation wurde <code>Infinity</code> als read only Eigenschaft (nur lesender Zugriff) eingestuft. (Dieses wurde in JavaScript 1.8.5 / Firefox 4 implementiert.)</p>

<h2 id="Beispiele">Beispiele</h2>

<pre class="brush: 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 */
</pre>

<h2 id="Spezifikationen">Spezifikationen</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Spezifikation</th>
   <th scope="col">Status</th>
   <th scope="col">Kommentar</th>
  </tr>
  <tr>
   <td>{{SpecName('ES1')}}</td>
   <td>{{Spec2('ES1')}}</td>
   <td>Initiale Definition. Implementiert in JavaScript 1.3</td>
  </tr>
  <tr>
   <td>{{SpecName('ES5.1', '#sec-15.1.1.2', 'Infinity')}}</td>
   <td>{{Spec2('ES5.1')}}</td>
   <td> </td>
  </tr>
  <tr>
   <td>{{SpecName('ES6', '#sec-value-properties-of-the-global-object-infinity', 'Infinity')}}</td>
   <td>{{Spec2('ES6')}}</td>
   <td> </td>
  </tr>
  <tr>
   <td>{{SpecName('ESDraft', '#sec-value-properties-of-the-global-object-infinity', 'Infinity')}}</td>
   <td>{{Spec2('ESDraft')}}</td>
   <td> </td>
  </tr>
 </tbody>
</table>

<h2 id="Browserkompatibilität">Browserkompatibilität</h2>



<p>{{Compat("javascript.builtins.Infinity")}}</p>

<h2 id="See_also" name="See_also">Siehe auch</h2>

<ul>
 <li>{{jsxref("Number.NEGATIVE_INFINITY")}}</li>
 <li>{{jsxref("Number.POSITIVE_INFINITY")}}</li>
 <li>{{jsxref("Number.isFinite")}}</li>
</ul>