Objects
Objects from the ground up: literals, reading and changing properties, destructuring, looping, references, JSON, getters, setters and descriptors.
Arrays (Phase 5) keep values in a numbered row. Objects keep values under names: a student's name, age and marks, a product's price and stock. Almost everything in JavaScript is built on objects, from the settings of a web app to the JSON a server sends back, so this phase is one of the most important in the course.
You'll write object literals with methods, shorthand and computed keys, read and change properties safely (dot, brackets, in, Object.hasOwn, optional chaining), unpack them with destructuring, merge them with spread, and loop over them with Object.keys, Object.values, Object.entries and Object.fromEntries.
Then you'll learn the idea that causes more bugs than any other: variables hold references to objects, not copies. You'll compare, freeze and update objects without changing the original, turn them into JSON text and back, and finish with getters, setters and the hidden property descriptors behind every property. Phase 7 builds on all of this with this, prototypes and classes.
Practise this phase
Hands-on exercises: write the code, see your page live, and press Check to have it tested automatically.