Functions calling other functions
A small function that does one job and is called from inside another function, so a big task is built from small, reusable parts.
Understanding Functions calling other functions in ACARA Digital Technologies Years 7–8
What it does: total() calls the helper double() twice and uses each returned value, showing a helper returning a value to its caller. main() calls three small functions that each do one job, so the big task is split into small steps. A helper does one small job and is called from inside another function. Here area calls square. addTwo(5) calls addOne(5) which gives 6. Then addOne(6) gives 7. The main program can read like a plan, such as: let total = getTotal(); showTotal(total);. This helper does exactly one job and returns a value, so other functions can call it and reuse the result.
Common mistakes: The closing bracket after the parameter list is missing. It should be function sumSquares(a, b) {. The function can then call the square() helper twice. A helper that gives a value to another function must use return. console.log only prints, so getName() gives back undefined and welcome() prints Hi undefined. It should be return "Sam";.
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 611–623) and word search (Modules 611–634).
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
helper functionFill in the Blanks
Spot the Error
Student with a class code? Join your class →