From 4289bf1fbb823f410775b4c7d0533b7abd8e5f5f Mon Sep 17 00:00:00 2001 From: 3indblown Leaf <69508345+kraccoon-dev@users.noreply.github.com> Date: Tue, 1 Feb 2022 19:42:11 +0900 Subject: remove class 1 (#3922) --- .../reference/global_objects/string/slice/index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'files/ko/web/javascript/reference/global_objects/string/slice') diff --git a/files/ko/web/javascript/reference/global_objects/string/slice/index.html b/files/ko/web/javascript/reference/global_objects/string/slice/index.html index 3bd23ace3b..6c0c54a50b 100644 --- a/files/ko/web/javascript/reference/global_objects/string/slice/index.html +++ b/files/ko/web/javascript/reference/global_objects/string/slice/index.html @@ -16,7 +16,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/slice

문법

-
str.slice(beginIndex[, endIndex])
+
str.slice(beginIndex[, endIndex])

매개변수

@@ -47,7 +47,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/slice

아래 예시는 새 문자열을 생성하기 위해 slice()를 사용합니다.

-
var str1 = 'The morning is upon us.', // the length of str1 is 23.
+
var str1 = 'The morning is upon us.', // the length of str1 is 23.
     str2 = str1.slice(1, 8),
     str3 = str1.slice(4, -2),
     str4 = str1.slice(12),
@@ -62,7 +62,7 @@ console.log(str5); // OUTPUT: ""
 
 

아래 예시는 slice()에 음수 인덱스를 사용합니다.

-
var str = 'The morning is upon us.';
+
var str = 'The morning is upon us.';
 str.slice(-3);     // returns 'us.'
 str.slice(-3, -1); // returns 'us'
 str.slice(0, -1);  // returns 'The morning is upon us'
@@ -70,16 +70,16 @@ str.slice(0, -1);  // returns 'The morning is upon us'
 
 

아래의 예시는 시작 인덱스를 찾기 위해 문자열의 끝에서부터 역방향으로 11개를 세고 끝 인덱스를 찾기 위해 문자열의 시작에서부터 정방향으로 16개를 셉니다.

-
console.log(str.slice(-11, 16)) // => "is u";
+
console.log(str.slice(-11, 16)) // => "is u";

아래에서는 시작 인덱스를 찾기 위해 문자열의 처음부터 정방향으로 11개를 세고 끝 인덱스를 찾기 위해 끝에서부터 7개를 셉니다.

-
console.log(str.slice(11, -7)) // => "is u";
+
console.log(str.slice(11, -7)) // => "is u";
 

이 인수는 끝에서부터 5로 역순으로 계산하여 시작 인덱스를 찾은 다음 끝에서부터 1을 거쳐 끝 인덱스를 찾습니다.

-
console.log(str.slice(-5, -1)) // => "n us";
+
console.log(str.slice(-5, -1)) // => "n us";
 

Specifications

-- cgit v1.2.3-54-g00ecf