Posted By

Tim_McClure on 04/14/13


Tagged


Versions (?)

For-In Loops with Objects


 / Published in: JavaScript
 

What this does is prints out every property within the object, rather than having to write the code for printing out each specific property.

In English, what is the code doing? It says: Assign the first property of the dog object to the variable property. Run the code (here, it is to print property to console). Then assign the second property of the dog object to the variable property. Again, run the code in the curly brackets. Keep repeating this until all the properties of the dog have been assigned to property.

Report this snippet  

You need to login to post a comment.