Methods calling other methods
Inside a class, a method calls another method of the same object by writing this. before its name, such as this.isPassing(). Forgetting this. causes a ReferenceError.
Understanding Methods calling other methods in ACARA Digital Technologies Years 9–10
What it does: isPassing() does one job only: it returns true or false. Other methods can reuse it by calling this.isPassing(). report() uses this.getGrade() to run a different method belonging to the same object. Inside a class, a method must use this. before another method's name. Writing isPassing() alone looks for a normal function and causes a ReferenceError. Methods are not found by their bare name. The fix is return this.average();. Calling a single-job method avoids repeated code. If the pass mark changes, you only fix it in one method. The method calls this.getTotal() to reuse that work instead of repeating the code, then divides the returned value.
Common mistakes: isPassing() is a method of the object, so calling it without this. causes a ReferenceError. It should be this.isPassing(). One method calling another must use this. before the name. Plain pass() looks for a separate function and causes a ReferenceError. It should be this.pass().
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 743–781) and word search (Modules 743–809).
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.methodName()Fill in the Blanks
Spot the Error
Student with a class code? Join your class →