Methods that change an object's properties
A method line that updates the object's own property, so its state changes each time the method is called. Calling deposit(50) twice adds 50 twice.
Understanding Methods that change an object's properties in ACARA Digital Technologies Years 9–10
What it does: The method uses this.balance to reach the object's own property and update it when called. Each call updates this.balance again, so two deposits of 50 add up to 100. The check must come before the change. In the wrong option the balance is already updated before the check runs. The -= operator updates the property itself, so the object's state changes. It does not just calculate a value.
Common mistakes: The closing bracket is missing from the parameter list. It should be deposit(amount) {. Without this., JavaScript looks for a variable called balance, not the object's property. It should be this.balance += amount;.
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
this.balance += amountFill in the Blanks
Spot the Error
Student with a class code? Join your class →