From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- .../global_objects/number/parseint/index.html | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 files/ko/web/javascript/reference/global_objects/number/parseint/index.html (limited to 'files/ko/web/javascript/reference/global_objects/number/parseint/index.html') diff --git a/files/ko/web/javascript/reference/global_objects/number/parseint/index.html b/files/ko/web/javascript/reference/global_objects/number/parseint/index.html new file mode 100644 index 0000000000..0b0a052016 --- /dev/null +++ b/files/ko/web/javascript/reference/global_objects/number/parseint/index.html @@ -0,0 +1,78 @@ +--- +title: Number.parseInt() +slug: Web/JavaScript/Reference/Global_Objects/Number/parseInt +tags: + - ECMAScript 2015 + - JavaScript + - Method + - Number + - Reference +translation_of: Web/JavaScript/Reference/Global_Objects/Number/parseInt +--- +
{{JSRef}}
+ +

Number.parseInt() 메서드는 문자열을 분석하고 특정 진수를 사용한 정수로 변환해 반환합니다.

+ +
{{EmbedInteractiveExample("pages/js/number-parseint.html")}}
+ + + +

구문

+ +
Number.parseInt(string,radix])
+
+ +

매개변수

+ +
{{page("ko/docs/Web/JavaScript/Reference/Global_Objects/parseInt", "매개변수")}}
+ +

반환 값

+ +

{{page("ko/docs/Web/JavaScript/Reference/Global_Objects/parseInt", "반환 값")}}

+ +

설명

+ +

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

+ +
Number.parseInt === parseInt; // true
+ +

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

+ +

폴리필

+ +
if (Number.parseInt === undefined) {
+    Number.parseInt = window.parseInt;
+}
+ +

명세

+ + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('ES6', '#sec-number.parseint', 'Number.parseInt')}}{{Spec2('ES6')}}Initial definition.
{{SpecName('ESDraft', '#sec-number.parseint', 'Number.parseInt')}}{{Spec2('ESDraft')}} 
+ +

브라우저 호환성

+ +
{{Compat("javascript.builtins.Number.parseInt")}}
+ +

같이 보기

+ + -- cgit v1.2.3-54-g00ecf