Object.keys():

Allows us to fnd those "undefined" items.

The code so far:


Effectively, what we want to do is to iterate over these items without having to specify a certain property. Up to now, we've been looking for the key "name", but now we are going to look for all the keys.

Lets find out what the key values are in the console:

Our code now looks like this: