aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/javascript/reference/global_objects/number/parsefloat/index.html
blob: 0b577230657726b6293c6c3368c3bb2b9361ef1a (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
---
title: Number.parseFloat()
slug: Web/JavaScript/Reference/Global_Objects/Number/parseFloat
tags:
  - ECMAScript 2015
  - JavaScript
  - Method
  - Number
translation_of: Web/JavaScript/Reference/Global_Objects/Number/parseFloat
---
<div>{{JSRef}}</div>

<p><strong><code>Number.parseFloat()</code></strong> 메서드는 문자열을 분석해 부동소수점 실수로 반환합니다.</p>

<div>{{EmbedInteractiveExample("pages/js/number-parsefloat.html")}}</div>



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

<pre class="syntaxbox">Number.parseFloat(<var>string</var>)</pre>

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

<p>{{page("ko/docs/Web/JavaScript/Reference/Global_Objects/parseFloat", "매개변수")}}</p>

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

<p>{{page("ko/docs/Web/JavaScript/Reference/Global_Objects/parseFloat", "반환 값")}}</p>

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

<p><code>Number.parseFloat()</code> 메서드는 전역 {{jsxref("parseFloat", "parseFloat()")}} 함수와 같은 기능을 가지고 있습니다.</p>

<pre>Number.parseFloat === parseFloat; // true</pre>

<p><code>Number.parseFloat()는</code> ECMAScript 2015에서 전역 범위의 모듈화를 위해 추가됐습니다. 상세한 정보와 예제는 {{jsxref("parseFloat", "parseFloat()")}}를 참고하세요.</p>

<h2 id="폴리필">폴리필</h2>

<pre class="brush: js">if (Number.parseFloat === undefined) {
    Number.parseFloat = parseFloat;
}
</pre>

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

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('ES2015', '#sec-number.parsefloat', 'Number.parseFloat')}}</td>
   <td>{{Spec2('ES2015')}}</td>
   <td>Initial definition.</td>
  </tr>
  <tr>
   <td>{{SpecName('ESDraft', '#sec-number.parsefloat', 'Number.parseFloat')}}</td>
   <td>{{Spec2('ESDraft')}}</td>
   <td> </td>
  </tr>
 </tbody>
</table>

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

<div>{{Compat("javascript.builtins.Number.parseFloat")}}</div>

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

<ul>
 <li>메서드가 속한 {{jsxref("Number")}} 객체.</li>
 <li>전역 {{jsxref("parseFloat", "parseFloat()")}} 메서드.</li>
</ul>