O'Reilly logo
  • Ahmed Elgendy thinks this is interesting:

One thing you can do is iterate through an object’s properties. To do that you can use a form of iteration we haven’t seen yet called for in. The for in iterator steps through every property in an object in an arbitrary order. Here’s how you could display all the properties of the chevy object:


Cover of Head First JavaScript Programming


How to access an object's properties?