aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/javascript/reference/global_objects/isfinite/index.html
blob: 834389e2f71461b4522fd8a1670a499a437a07a5 (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
84
---
title: isFinite()
slug: Web/JavaScript/Reference/Global_Objects/isFinite
tags:
  - JavaScript
  - Reference
translation_of: Web/JavaScript/Reference/Global_Objects/isFinite
---
<div>{{jsSidebar("Objects")}}</div>

<p><code><strong>isFinite()</strong></code> 전역 함수는 주어진 값이 유한수인지 판별합니다. 필요한 경우 매개변수를 먼저 숫자로 변환합니다.</p>

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



<h2 id="구문">구문</h2>

<pre class="syntaxbox notranslate">isFinite(<em>testValue</em>)</pre>

<h3 id="매개변수">매개변수</h3>

<dl>
 <dt><code>testValue</code></dt>
 <dd>유한한지 판별할 값.</dd>
</dl>

<h3 id="반환_값">반환 값</h3>

<p><code>testValue</code>가 양 또는 음의 {{jsxref("Infinity")}}, {{jsxref("NaN")}}, 또는 {{jsxref("undefined")}}<code>false</code>, 아니면 <code>true</code>.</p>

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

<p><code>isFinite()</code>은 최상위 함수로 어떤 객체와도 연결되지 않았습니다.</p>

<p>숫자가 유한수인지 판별하기 위해 <code>isFinite()</code>을 사용할 수 있습니다. <code>isFinite()</code>은 주어진 수를 검사해 그 값이 <code>NaN</code>, 양의 무한대, 또는 음의 무한대이면 <code>false</code>를 반환합니다. 그렇지 않으면 <code>true</code>를 반환합니다.</p>

<h2 id="예제">예제</h2>

<h3 id="isFinite_사용하기"><code>isFinite()</code> 사용하기</h3>

<pre class="brush: js notranslate">isFinite(Infinity);  // false
isFinite(NaN);       // false
isFinite(-Infinity); // false

isFinite(0);         // true
isFinite(2e64);      // true
isFinite(910);       // true

isFinite(null);      // true, would've been false with the
                     // more robust Number.isFinite(null)

isFinite('0');       // true, would've been false with the
                     // more robust Number.isFinite("0")</pre>

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

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('ESDraft', '#sec-isfinite-number', 'isFinite')}}</td>
  </tr>
 </tbody>
</table>

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



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

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

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