From 1fc3430e5fb35e8358fb23670639a3b2a8075a88 Mon Sep 17 00:00:00 2001 From: EUNHEE JU Date: Thu, 14 Oct 2021 21:06:04 +0900 Subject: edit toString() to fix syntax of content (#2731) * edit toString() to fix syntax of content * edit toString() - append code tag --- .../global_objects/object/tostring/index.html | 38 ++++++++++------------ 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'files/ko/web/javascript/reference/global_objects') diff --git a/files/ko/web/javascript/reference/global_objects/object/tostring/index.html b/files/ko/web/javascript/reference/global_objects/object/tostring/index.html index 4ae67eb2b7..299b269117 100644 --- a/files/ko/web/javascript/reference/global_objects/object/tostring/index.html +++ b/files/ko/web/javascript/reference/global_objects/object/tostring/index.html @@ -37,32 +37,30 @@ o.toString(); // returns [object Object]

매개변수

-숫자 및 BigInts의 경우 `toString()`은 선택적으로 `기수(radix)`를 매개변수로 취합니다. -기수의 값은 최소 2부터 36까지입니다. +

숫자 및 BigInts의 경우 toString()은 선택적으로 기수(radix)를 매개변수로 취합니다. 기수의 값은 최소 2부터 36까지입니다.

-`기수`를 이용함으로써 10진수를 (1, 2, 3, 4, 5...) 다른 진수로 변환할 수 있습니다. 아래는 10진수를 2진수로 변환하는 예제입니다. +

기수를 이용함으로써 10진수를 (1, 2, 3, 4, 5...) 다른 진수로 변환할 수 있습니다. 아래는 10진수를 2진수로 변환하는 예제입니다.

-```js -let baseTenInt = 10; -console.log(baseTenInt.toString(2)); -// "1010"이 출력됩니다 -``` - -big integers도 이와 같습니다 +
let baseTenInt = 10;
+  console.log(baseTenInt.toString(2));
+  // "1010"이 출력됩니다
+
-```js -let bigNum = BigInt(20); -console.log(bigNum.toString(2)); -// "10100"이 출력됩니다 -``` +

big integers도 이와 같습니다

-몇가지 일반적인 기수들은 아래와 같습니다 +
let bigNum = BigInt(20);
+  console.log(bigNum.toString(2));
+  // "10100"이 출력됩니다
+
-- 2 : [2진법](https://ko.wikipedia.org/wiki/%EC%9D%B4%EC%A7%84%EB%B2%95), -- 8 : [8진법](https://ko.wikipedia.org/wiki/%ED%8C%94%EC%A7%84%EB%B2%95), -- 10 : [10진법](https://ko.wikipedia.org/wiki/%EC%8B%AD%EC%A7%84%EB%B2%95), -- 16 : [16진법](https://ko.wikipedia.org/wiki/%EC%8B%AD%EC%9C%A1%EC%A7%84%EB%B2%95). +

몇 가지 일반적인 기수들은 아래와 같습니다

+

Examples

-- cgit v1.2.3-54-g00ecf