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/lastindexof/index.html | 8 ++++---- .../reference/global_objects/string/slice/index.html | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'files/ko/web/javascript/reference/global_objects/string') diff --git a/files/ko/web/javascript/reference/global_objects/string/lastindexof/index.html b/files/ko/web/javascript/reference/global_objects/string/lastindexof/index.html index d2244feee5..90aeaf3af0 100644 --- a/files/ko/web/javascript/reference/global_objects/string/lastindexof/index.html +++ b/files/ko/web/javascript/reference/global_objects/string/lastindexof/index.html @@ -19,7 +19,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/lastIndexOf
str.lastIndexOf(searchValue[, fromIndex])+
str.lastIndexOf(searchValue[, fromIndex])
문자열의 문자는 왼쪽에서 오른쪽으로 인덱스를 매깁니다. 첫 번째 문자의 인덱스는 0이며, 마지막 문자의 인덱스는 str.length -1입니다.
'canal'.lastIndexOf('a'); // 3 반환
+'canal'.lastIndexOf('a'); // 3 반환
'canal'.lastIndexOf('a', 2); // 1 반환
'canal'.lastIndexOf('a', 0); // -1 반환
'canal'.lastIndexOf('x'); // -1 반환
@@ -56,7 +56,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/lastIndexOf
lastIndexOf() 메서드는 대소문자를 구분합니다. 예를 들어, 아래 예제는 -1을 반환합니다.
-'Blue Whale, Killer Whale'.lastIndexOf('blue'); // -1 반환
+'Blue Whale, Killer Whale'.lastIndexOf('blue'); // -1 반환
예제
@@ -65,7 +65,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/lastIndexOf
아래 예제는 문자열 "Brave new world" 내에서 특정 값의 위치를 확인하기 위해 {{jsxref("String.prototype.indexOf()", "indexOf()")}}와 lastIndexOf()를 사용합니다.
-let anyString = 'Brave new world';
+let anyString = 'Brave new world';
console.log('시작점으로부터 처음 만나는 w의 위치는 ' + anyString.indexOf('w'));
// logs 8
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