리비전 비교

Array.forEach

리비전 409963:

리비전 409963 iMaZiNe

리비전 411685:

리비전 411685 iMaZiNe

제목:
Array.forEach
Array.forEach
슬러그:
JavaScript/Reference/Global_Objects/Array/forEach
JavaScript/Reference/Global_Objects/Array/forEach
태그:
"JavaScript","array","forEach"
내용:

Revision 409963
Revision 411685
n7    <h2 id="Summary">n7    <h2 id=".EA.B0.9C.EC.9A.94">
n40    <h2 id="Syntax">n40    <h2 id=".EB.AC.B8.EB.B2.95">
n46    <h3 id="Parameters">n46    <h3 id=".ED.8C.8C.EB.9D.BC.EB.A9.94.ED.84.B0">
n63    <h2 id="Description">n63    <h2 id=".EC.84.A4.EB.AA.85">
n84      <code>forEach</code> 요소의 범위는&nbsp; <code>첫 callback 의 실행전에 n84      <code>forEach</code> 요소의 범위는&nbsp; <code>첫 callback 실행전에 정
>정의된다.</code> <code>forEach</code> 실행 후 추가된 요소들은 <code>callback</c>의된다.</code> <code>forEach</code> 실행 후 추가된 요소들은 <code>callback</co
>ode>이 적용되지 않는다. 이미 존재하는 배열의 요소가 변경되거나 삭제되는 중에 <code>forEach 의</co>de>이 적용되지 않는다. 이미 존재하는 배열의 요소가 변경되거나 삭제되는 중에 <code>forEach의</code
>de> <code>callback</code> 을 만나면 그 요소는 삭제되거나 적용되지 않는다.>> <code>callback</code>을 만나면 그 요소는 삭제되거나 적용되지 않는다.
n86    <h2 id="Examples">n86    <h2 id=".EC.98.88.EC.A0.9C">
n89    <h3 id="Printing_the_contents_of_an_array">n89    <h3 id=".EB.B0.B0.EC.97.B4.EC.9D.98_.EC.9A.94.EC.86.8C.EB.A5.
 >BC_.EC.B6.9C.EB.A0.A5.ED.95.98.EA.B8.B0">
n93      The following code logs a line for each element in an arrayn93      아래 코드를 따라 배열의 각 요소를 라이별 로그로 출력한다.
>: 
n106      An object copy functionn106      object 복사 함수
n109      The following code creates a copy of a given object. There n109      아래 코드를 따라 object의 복사본을 생성한다. 이 방법은 Object의 복사본을 생성하는 여러 방법들
>are different ways to create a copy of an object. This one is jus> 중 <code>하나인 Array.prototype.forEach가 어떻게 동작하는지 설명한다.</code> 이 예제
>t one of them here to explain how <code>Array.prototype.forEach</>는 몇개의 ECMAScript 5 Object.* 함수들을 사용한다.
>code> works. It uses a couple of new ECMAScript 5 Object.* functi 
>ons. 
n128      Compatibilityn128      호환성
129    </h2>
130    <p>129    </h2>
131      <code>forEach</code> is a recent addition to the ECMA-262 s130    <p>
>tandard; as such it may not be present in other implementations o 
>f the standard. You can work around this by inserting the followi 
>ng code at the beginning of your scripts, allowing use of <code>f 
>orEach</code> in implementations which do not natively support it 
>. 
131      <code>forEach</code>는 최근에 추가된 ECMA-262 표준안이다 ; 따라서 다른 표준안의 
 >구현을 보장할 수 없다. 아래의 코드를 script의 시작에 추가하면, 기본 함수로 지원되지 않을 때 <code>fo
 >rEach</code> 구현체를 실행하여 이를 회피할 수 있다.
n143      An algorithm 100% true to the ECMA-262, 5th edition can be n143      ECMA-262, 5차 계정안을 충실히 따르는 알고리즘은 아래와 같다.
>seen below: 
144    </p>
145    <p>144    </p>
146      This algorithm is exactly the one specified in ECMA-262, 5t145    <p>
>h edition, assuming <code>Object</code> and <code>TypeError</code 
>> have their original values and that <code>callback.call</code>  
>evaluates to the original value of <code><a href="/en-US/docs/Jav 
>aScript/Reference/Global_Objects/Function/call" title="JavaScript 
>/Reference/Global Objects/Function/call">Function.prototype.call< 
>/a></code>. 
146      이 알고리즘은 ECMA-262, 5차 계정의 명시대로 <code>자신의 고유값을 가진것으로 추정되는 Obj
 >ect</code><code>와 TypeError</code>의 <code>callback.call</code>을 <
 >code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Fun
 >ction/call" title="JavaScript/Reference/Global Objects/Function/c
 >all">Function.prototype.call</a></code>의 고유 값으로 산정한다.
n209      Browser compatibilityn209      브라우저 호환성
t307      Based on <a class="external" href="http://kangax.github.comt307      참조. <a class="external" href="http://kangax.github.com/es5-
>/es5-compat-table/">Kangax's compat tables</a>>compat-table/">Kangax's compat tables</a>
308    </p>
309    <h2>308    </p>
310      See also309    <h2 id="See_also">
310      비교

이력으로 돌아가기