mozilla

Compare Revisions

for...in

Change Revisions

Revision 337303:

Revision 337303 by madarche on

Revision 337311:

Revision 337311 by madarche on

Title:
for...in
for...in
Slug:
JavaScript/Reference/Statements/for...in
JavaScript/Reference/Statements/for...in
Content:

Revision 337303
Revision 337311
n77        If you only want to consider properties attached to the on77        If you only want to consider properties attached to the o
>bject itself, and not its prototypes, perform a&nbsp;<a class="in>bject itself, and not its prototypes, use <a href="https://develo
>ternal" href="/en/JavaScript/Reference/Global_Objects/Object/hasO>per.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Ob
>wnProperty" title="en/Core JavaScript 1.5 Reference/Global Object>ject/getOwnPropertyNames" title="https://developer.mozilla.org/en
>s/Object/hasOwnProperty">hasOwnProperty</a>&nbsp;check (<a class=>-US/docs/JavaScript/Reference/Global_Objects/Object/getOwnPropert
>"internal" href="/en/JavaScript/Reference/Global_Objects/Object/p>yNames">getOwnPropertyNames</a> or perform a&nbsp;<a class="inter
>ropertyIsEnumerable" title="en/Core JavaScript 1.5 Reference/Glob>nal" href="/en/JavaScript/Reference/Global_Objects/Object/hasOwnP
>al Objects/Object/propertyIsEnumerable">propertyIsEnumerable</a> >roperty" title="en/Core JavaScript 1.5 Reference/Global Objects/O
>can also be used). Alternatively, if you know there won't be any >bject/hasOwnProperty">hasOwnProperty</a>&nbsp;check (<a class="in
>outside code interference, you can extend built-in prototypes wit>ternal" href="/en/JavaScript/Reference/Global_Objects/Object/prop
>h a check method.>ertyIsEnumerable" title="en/Core JavaScript 1.5 Reference/Global 
 >Objects/Object/propertyIsEnumerable">propertyIsEnumerable</a> can
 > also be used). Alternatively, if you know there won't be any out
 >side code interference, you can extend built-in prototypes with a
 > check method.
tt159      <li>
160        <a href="https://developer.mozilla.org/en-US/docs/JavaScr
 >ipt/Reference/Global_Objects/Object/getOwnPropertyNames" title="h
 >ttps://developer.mozilla.org/en-US/docs/JavaScript/Reference/Glob
 >al_Objects/Object/getOwnPropertyNames">getOwnPropertyNames</a>
161      </li>
162      <li>
163        <a href="https://developer.mozilla.org/en-US/docs/JavaScr
 >ipt/Reference/Global_Objects/Object/hasOwnProperty" title="https:
 >//developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Ob
 >jects/Object/hasOwnProperty">hasOwnProperty</a>
164      </li>

Back to History