JavaScript Objects Practice Exercises
Properties, prototypes, and object patterns
Challenges
Object Literals
Object Literals
An object literal groups related values under property names. The object becomes...
Bracket Notation
Dot notation reads a property whose name is written directly in the code. Bracke...
Property Updates
A `const` object variable keeps pointing at the same object, but the object's pr...
Nested Objects
Objects can contain other objects. Reading nested data means following the path ...
Reading Object Properties
JavaScript functions often receive one object instead of several values, so reus...
Computed Property Names
An object literal can use a value as a property name. Square brackets inside the...
Destructuring Defaults
Object destructuring pulls named properties into local variables. A default valu...
Object Spread Copies
Object spread copies the own enumerable properties from one object into another ...
Optional Chaining
Nested object reads fail when an intermediate value is `null` or `undefined`. Op...
Lookup Objects
Practice JavaScript object indexing by turning an array of records into direct i...
Frequency Objects
Practice JavaScript objects as frequency tables by counting ticket statuses unde...
Nested Object Copies
Practice JavaScript object spread by updating a nested preferences value through...
Object Rest
Practice JavaScript object rest syntax by removing known private fields while ke...
Object.entries
Practice JavaScript Object.entries by converting request parameters into a sorte...
Object Path Reading
Practice JavaScript object path reading by walking nested data from an array of ...
Nested Object Merging
Practice JavaScript nested object merging by combining defaults with user overri...
Nested Grouping
Practice JavaScript object grouping by building role-based arrays from project m...
Inverting Object Maps
Practice JavaScript object inversion by grouping original keys under the values ...