MODULE 2 · Working with data
Reading · 15 min
Objects
Objects
Objects group values by meaning rather than position. They are well suited to a user, product, or configuration.
Learning objectives
- Create and access object properties
- Use destructuring for readable access
Represent related information using named properties. Focus on explaining each decision in your own words before relying on a pattern or shortcut.
Example
const user = { name: "Mira", role: "editor" };
const { name, role } = user;
console.log(`${name} is an ${role}`);Summary
KEY TAKEAWAYS
- Objects label related values.
- Destructuring can make intent clearer.
Reading material
Objects practice prompt
Use the exercise in this lesson to check your understanding.
Your progress is saved on this device. Sign in to keep it across devices.
