aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/javascript/reference/global_objects/infinity/index.html
blob: 8c5a8c6e77278ea1669c427cb8675f7718c27c41 (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
---
title: Infinity
slug: Web/JavaScript/Reference/Global_Objects/Infinity
tags:
  - JavaScript
  - Property
  - Reference
translation_of: Web/JavaScript/Reference/Global_Objects/Infinity
---
<div>{{jsSidebar("Objects")}}</div>

<p><code><strong>Infinity</strong></code> 전역 속성은 무한대를 나타내는 숫자값입니다.</p>

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

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

<h2 id="설명">설명</h2>

<p><code>Infinity</code>는 전역 객체의 속성입니다. 즉, 전역 스코프의 변수입니다.</p>

<p><code>Infinity</code>의 초기값은 {{jsxref("Number.POSITIVE_INFINITY")}}입니다. <code>Infinity</code>(양의 무한대)는 다른 어떤 수보다 더 큽니다.</p>

<p>수학적인 무한대와는 일부 차이점이 있습니다. {{jsxref("Number.POSITIVE_INFINITY")}} 문서에서 더 알아보세요.</p>

<p><code>Infinity</code>는 ECMAScript 5 명세에 따라 읽기 전용입니다.</p>

<h2 id="예제">예제</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 */
console.log(1 / 0);             /* Infinity */
</pre>

<h2 id="명세">명세</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">명세</th>
  </tr>
  <tr>
   <td>{{SpecName('ESDraft', '#sec-value-properties-of-the-global-object-infinity', 'Infinity')}}</td>
  </tr>
 </tbody>
</table>

<h2 id="브라우저_호환성">브라우저 호환성</h2>



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

<h2 id="같이_보기">같이 보기</h2>

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