diff options
author | alattalatta <urty5656@gmail.com> | 2021-12-16 02:01:24 +0900 |
---|---|---|
committer | Kyle <mkitigy@gmail.com> | 2021-12-27 07:54:38 +0900 |
commit | 06bc06d023186d8d36f90c88e76a9e4c03446534 (patch) | |
tree | e50d797ff0a10a0b6153f77630a459776f70730a /files/ko/web/javascript/guide/loops_and_iteration | |
parent | f2fe09baf63c96c009dd7348a34d2032b993433e (diff) | |
download | translated-content-06bc06d023186d8d36f90c88e76a9e4c03446534.tar.gz translated-content-06bc06d023186d8d36f90c88e76a9e4c03446534.tar.bz2 translated-content-06bc06d023186d8d36f90c88e76a9e4c03446534.zip |
Remove notranslate from JS guides
Diffstat (limited to 'files/ko/web/javascript/guide/loops_and_iteration')
-rw-r--r-- | files/ko/web/javascript/guide/loops_and_iteration/index.html | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/files/ko/web/javascript/guide/loops_and_iteration/index.html b/files/ko/web/javascript/guide/loops_and_iteration/index.html index 4b0ac738b6..fe91f8b877 100644 --- a/files/ko/web/javascript/guide/loops_and_iteration/index.html +++ b/files/ko/web/javascript/guide/loops_and_iteration/index.html @@ -9,7 +9,7 @@ translation_of: Web/JavaScript/Guide/Loops_and_iteration <p>반복문을 게임의 컴퓨터화된 버전이라고 생각해 보세요. 누군가에게 한 방향으로 X만큼 가게 시키고 다른 방향으로 Y만큼 더 가게 한다고 생각해 보십시오. 예를들어, "동쪽으로 5만큼 가세요"는 다음과 같이 반복문으로 표현 될 수 있습니다.</p> -<pre class="brush: js notranslate">var step; +<pre class="brush: js">var step; for (step = 0; step < 5; step++) { // Runs 5 times, with values of step 0 through 4. console.log('Walking east one step'); @@ -35,7 +35,7 @@ for (step = 0; step < 5; step++) { <p>for 반복문은 어떤 특정한 조건이 거짓으로 판별될 때까지 반복합니다. 자바스크립트의 반복문은 C의 반복문과 비슷합니다. for 반복문은 다음과 같습니다.</p> -<pre class="syntaxbox notranslate">for ([초기문]; [조건문]; [증감문]) +<pre class="syntaxbox">for ([초기문]; [조건문]; [증감문]) 문장 </pre> @@ -52,7 +52,7 @@ for (step = 0; step < 5; step++) { <p>다음 함수는 스크롤링 목록(다중 선택을 허용하는 요소 {{HTMLElement("select")}}). 에서 선택된 옵션들을 세는 for문 입니다. 이 for문은 변수 i 를 선언하고 0으로 초기화 시킵니다. 이것은 i 가 <select> 요소 안의 옵션 수가 i 보다 작은지 확인 합니다. 다음의 if문을 수행하고 각 루프를 빠져나간 뒤 i 를 1 증가시킵니다.</p> -<pre class="brush: html notranslate"><form name="selectForm"> +<pre class="brush: html"><form name="selectForm"> <p> <label for="musicTypes">Choose some music types, then click the button below:</label> <select id="musicTypes" name="musicTypes" multiple="multiple"> @@ -90,7 +90,7 @@ btn.addEventListener("click", function(){ <p>do...while 문은 특정한 조건이 거짓으로 판별될 때까지 반복합니다. do...while 문은 다음과 같습니다.</p> -<pre class="syntaxbox notranslate">do +<pre class="syntaxbox">do 문장 while (조건문); </pre> @@ -101,7 +101,7 @@ while (조건문); <p>다음 예제에서, do 반복문은 최소 한번은 반복됩니다. 그리고 i 가 5보다 작지 않을 때까지 계속 반복됩니다.</p> -<pre class="brush: js notranslate">do { +<pre class="brush: js">do { i += 1; console.log(i); } while (i < 5);</pre> @@ -110,7 +110,7 @@ while (조건문); <p>while 문은 어떤 조건문이 참이기만 하면 문장을 계속해서 수행합니다. while 문은 다음과 같습니다.</p> -<pre class="syntaxbox notranslate">while (조건문) +<pre class="syntaxbox">while (조건문) 문장 </pre> @@ -124,7 +124,7 @@ while (조건문); <p>다음 while 반복문은 n이 3보다 작은 한, 계속 반복됩니다.</p> -<pre class="brush: js notranslate">n = 0; +<pre class="brush: js">n = 0; x = 0; while (n < 3) { n++; @@ -146,7 +146,7 @@ while (n < 3) { <p>조건문은 항상 거짓이 될지라도 무한 루프는 피해야 합니다. 그렇지 않으면 그 반복문은 영원히 끝나지 않을 것입니다. 아래의 while 문은 조건문이 절대 거짓이 될 수 없으므로 영원히 반복될 것입니다.</p> -<pre class="brush: js notranslate">// 다음과 같은 코드는 피하세요. +<pre class="brush: js">// 다음과 같은 코드는 피하세요. while (true) { console.log("Hello, world"); }</pre> @@ -157,7 +157,7 @@ while (true) { <p>레이블 문의 구문은 다음과 같습니다:</p> -<pre class="syntaxbox notranslate">label : +<pre class="syntaxbox">label : statement </pre> @@ -167,7 +167,7 @@ while (true) { <p>이 예에서, 레이블 markLoop는 while 루프를 식별합니다.</p> -<pre class="brush: js notranslate">markLoop: +<pre class="brush: js">markLoop: while (theMark == true) { doSomething(); }</pre> @@ -194,7 +194,7 @@ while (theMark == true) { <p>다음 예</p> -<pre class="brush: js notranslate">for (i = 0; i < a.length; i++) { +<pre class="brush: js">for (i = 0; i < a.length; i++) { if (a[i] == theValue) { break; } @@ -202,7 +202,7 @@ while (theMark == true) { <h3 id="예시_2_Breaking_to_a_label"><strong>예시 2: </strong>Breaking to a label</h3> -<pre class="brush: js notranslate">var x = 0; +<pre class="brush: js">var x = 0; var z = 0 labelCancelLoops: while (true) { console.log("Outer loops: " + x); @@ -240,7 +240,7 @@ labelCancelLoops: while (true) { <p>다음의 예는 i 값이 3일 때 실행하는 continue 문과 함께 while 루프를 보여줍니다. 따라서, n은 값 1, 3, 7, 12를 취합니다.</p> -<pre class="brush: js notranslate">i = 0; +<pre class="brush: js">i = 0; n = 0; while (i < 5) { i++; @@ -257,7 +257,7 @@ while (i < 5) { <p>continue가 checkiandj의 레이블을 가지고 있다면, 프로그램은 checkiandj 문 상단에서 계속될 것입니다.</p> -<pre class="brush: js notranslate">checkiandj: +<pre class="brush: js">checkiandj: while (i < 4) { console.log(i); i += 1; @@ -278,7 +278,7 @@ while (i < 5) { <p><a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...in"><code>for...in</code></a> 문은 객체의 열거 속성을 통해 지정된 변수를 반복합니다. 각각의 고유한 속성에 대해, JavaScript는 지정된 문을 실행합니다. for...in 문은 다음과 같습니다:</p> -<pre class="syntaxbox notranslate">for (variable in object) { +<pre class="syntaxbox">for (variable in object) { statements } </pre> @@ -287,7 +287,7 @@ while (i < 5) { <p>다음 함수는 객체와 객체의 이름을 함수의 인수로 취합니다. 그런 다음 모든 객체의 속성을 반복하고 속성 이름과 값을 나열하는 문자열을 반환합니다.</p> -<pre class="brush: js notranslate">function dump_props(obj, obj_name) { +<pre class="brush: js">function dump_props(obj, obj_name) { var result = ""; for (var i in obj) { result += obj_name + "." + i + " = " + obj[i] + "<br>"; @@ -299,7 +299,7 @@ while (i < 5) { <p>속성 make와 model을 가진 객체 car의 경우, 결과는 다음과 같습니다:</p> -<pre class="brush: js notranslate">car.make = Ford +<pre class="brush: js">car.make = Ford car.model = Mustang </pre> @@ -311,13 +311,13 @@ car.model = Mustang <p><code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...of">for...of</a></code> 문은 각각의 고유한 특성의 값을 실행할 명령과 함께 사용자 지정 반복 후크를 호출하여, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/iterable">반복 가능한 객체</a>({{jsxref("배열")}}, {{jsxref("Map")}}, {{jsxref("Set")}}, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/arguments">인수</a> 객체 등을 포함)를 통해 반복하는 루프를 만듭니다.</p> -<pre class="syntaxbox notranslate">for (<em>variable</em> of <em>object</em>) { +<pre class="syntaxbox">for (<em>variable</em> of <em>object</em>) { <em>statement </em>}</pre> <p>다음 예는 for...of 루프와 <code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...in" title="en-US/docs/JavaScript/Reference/Statements/for...in">for...in</a></code> 루프의 차이를 보여줍니다. 속성 이름을 통해 for...in이 반복하는 동안, for...of은 속성 값을 통해 반복합니다:</p> -<pre class="brush:js notranslate">let arr = [3, 5, 7]; +<pre class="brush:js">let arr = [3, 5, 7]; arr.foo = "hello"; for (let i in arr) { |