Changing and adding object properties
Assigning to object.property with = changes an existing property or adds a new one if it is not there yet. Reading a property that does not exist gives undefined.
Understanding Changing and adding object properties in ACARA Digital Technologies Years 9–10
What it does: JavaScript does not throw an error for a missing property; reading it just gives undefined. Writing object.newName = value adds the property named newName with that value. A single = assigns a value. Double == only compares values and changes nothing. const stops you reassigning the variable itself, but the properties inside the object can still be changed. The assignment added points to the object, so reading it afterwards gives 10. A double equals checks equality and leaves the object unchanged, so the property is not updated.
Common mistakes: Inside an object literal, each property is written as name: value with a colon. It should be { age: 15 }. The = sign is only used when assigning with dot notation after the object exists. Property names are case-sensitive. The property was added as age, so pet.Age does not exist and gives undefined. It should be pet.age.
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 728–742) and word search (Modules 710–742).
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
student.age = 16Fill in the Blanks
Spot the Error
Student with a class code? Join your class →