Lesson 6 — Objects
Objects
An object groups related data as key: value pairs inside curly braces, and you read a value with a dot: user.name. It describes one thing with many properties.
Why it matters: objects model real-world items — a user, a product, settings — and are the shape of almost all web data (JSON).
Tip: you can also read a property with brackets, user["name"], handy when the key is in a variable.
Add age and log a sentence.
Ready for more? These paid resources pick up where this lesson leaves off.
Project-based JavaScript Foundations video courses — the perfect paid next step after these free lessons.
Browse on Udemy →Hand-picked JavaScript Foundations books to master the fundamentals offline.
See on Amazon →Some links on this page are affiliate links: we may earn a commission at no extra cost to you. We only recommend tools we believe are genuinely useful.