mozilla

Compare Revisions

Working with objects

Change Revisions

Revision 47798:

Revision 47798 by Chealer on

Revision 47799:

Revision 47799 by miguel.cgrodrigues on

Title:
Working with objects
Working with objects
Slug:
JavaScript/Guide/Working_with_Objects
JavaScript/Guide/Working_with_Objects
Tags:
JavaScript, NeedsEditorialReview, Document, Object
JavaScript, NeedsEditorialReview, Document, Object
Content:

Revision 47798
Revision 47799
t99<code> function listAllProperties(o){     var objectToInspect;   t99<code>function listAllProperties(o){     <br>    var objectToInsp
>  var result = [];          for( objectToInspect = o ;           >ect;     <br>   var result = [];<br>    <br>    for(objectToInspe
>objectToInspect !== null ;           objectToInspect = Object.get>ct = o; objectToInspect !== null; objectToInspect = Object.getPro
>PrototypeOf(objectToInspect) ) {               result = result.co>totypeOf(objectToInspect)){  <br>             result = result.con
>ncat( Object.getOwnPropertyNames(objectToInspect) );     }       >cat(Object.getOwnPropertyNames(objectToInspect));  <br>      }<br
>   return result; } </code>>>   <br>    return result; <br>}   </code>

Back to History