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/string/tostring/index.html | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 files/ko/web/javascript/reference/global_objects/string/tostring/index.html (limited to 'files/ko/web/javascript/reference/global_objects/string/tostring') diff --git a/files/ko/web/javascript/reference/global_objects/string/tostring/index.html b/files/ko/web/javascript/reference/global_objects/string/tostring/index.html new file mode 100644 index 0000000000..999d5c0c74 --- /dev/null +++ b/files/ko/web/javascript/reference/global_objects/string/tostring/index.html @@ -0,0 +1,59 @@ +--- +title: String.prototype.toString() +slug: Web/JavaScript/Reference/Global_Objects/String/toString +translation_of: Web/JavaScript/Reference/Global_Objects/String/toString +--- +
{{JSRef}}
+ +

toString()메소드는 지정된 객체를 나타내는 문자열을 반환합니다.

+ +
{{EmbedInteractiveExample ( "pages / js / string-tostring.html")}}
+ +

통사론

+ +
str.toString()
+ +

반환 값

+ +

호출 객체를 나타내는 문자열

+ +

기술

+ +

{{jsxref ( "String")}} 오브젝트 toString()는 {{jsxref ( "Object")}} 오브젝트 메소드를 대체 합니다. {{jsxref ( "Object.prototype.toString ()")}}을 상속하지 않습니다. {{jsxref ( "String")}} 오브젝트의 경우 toString()메소드는 오브젝트 의 문자열 표시를 리턴하며 {{jsxref ( "String.prototype.valueOf ()")}} 메소드와 동일합니다.

+ +

+ +

사용 toString()

+ +

다음 예제는 {{jsxref ( "String")}} 오브젝트의 문자열 값을 표시합니다.

+ +
var x = new String ( 'Hello world');
+
+console.log (x.toString ()); // 'Hello world'를 기록합니다.
+
+ +

명세서

+ + + + + + + + + + +
사양
{{SpecName ( 'ESDraft', '# sec-string.prototype.tostring', 'String.prototype.toString')}}}
+ +

브라우저 호환성

+ + + +

{{Compat ( "javascript.builtins.String.toString")}}

+ +

또한보십시오

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