Nested Arrays and Objects
Chains dot notation and bracket notation to access a value nested inside an object.
Understanding Nested Arrays and Objects in JavaScript
What it does: The first bracket picks a row, the second picks a column. The bracket picks the object, then the dot reads its property. This chains dot notation and bracket notation to reach the nested value. You can mix .property and [index] to reach deeply nested values. Two bracket accesses in a row reach into an array of arrays. Array indexes need brackets: users[0].name, not a dot. Each dot goes one level deeper into the nested object. Without quotes, city is read as a variable, not a property name.
Common mistakes: Missing the dot before pets - it should be obj.pets[0]. Missing the dot before addr - it should be obj.addr.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 31–40) and word search (Modules 21–52).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
obj.pets[0]Fill in the Blanks
Spot the Error
Student with a class code? Join your class →