Iterating Objects
Explore how to iterate through JavaScript objects using methods like Object.keys, Object.values, and Object.entries, as well as for/in loops. Understand how these techniques allow you to access keys and values in objects, giving you control over data manipulation in your code.
Background
In this lesson, we see how loops iterate objects.
Objects recap
Objects are an unordered collection of data where each data item is a value referenced by a key (property name). To access each data item in an object, the property name is used to refer to that value.
Iterating objects
To access a data item in an object, use its key (property name). To access all values, we need to use a list of keys.
Object methods
Take a look at some of the object’s methods that will help us iterate an ...