Sequence: statements run top to bottom
Statements run one after another from top to bottom, so changing the order of lines can change the result. A variable must be set before it is used.
Understanding Sequence: statements run top to bottom in ACARA Digital Technologies Years 7–8
What it does: age is declared and given a value on the first line, so the console.log on the second line can use it. This prints Go! before Ready. Swapping the two lines would print Ready first, so the order changes the result. This is called sequence. Statements run in the order they are written, from the top down. Order matters in sequence. For example, a console.log placed before or after a change to a variable shows different values. A let variable must be set before it is used. In the second version, score is used before it has been declared, which causes an error.
Common mistakes: Line 3 uses avg, but avg is not set until line 4. Statements run top to bottom, so avg does not exist yet. It should be let sum = a + b;. The name live was never set, so line 2 causes a ReferenceError. The variable set on line 1 is lives, so it should be lives = lives - 1;.
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 562–580) and word search (Modules 522–580).
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
sequenceFill in the Blanks
Spot the Error
Student with a class code? Join your class →