← ACARA Digital Technologies Years 7–8

Statements and semicolons

A statement is one instruction in JavaScript, usually written on its own line and ended with a semicolon (;). This line is one statement.

Understanding Statements and semicolons in ACARA Digital Technologies Years 7–8

What it does: There are two instructions here, so they sit on two lines. Each one is a separate statement that ends with its own semicolon. Semicolons mark the end of an instruction. Colons are used for other things, like object properties. Writing one statement per line makes code easier to read and to debug. The whole call to console.log() is a single instruction, so it is one statement. JavaScript runs statements in order, one after another, from top to bottom.

Common mistakes: The statement 'let age = 13' has no semicolon at the end. Each statement should finish with a semicolon: let age = 13;. The statement ends with a colon (:) instead of a semicolon (;). It should be score = score + 5;.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

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 522–560) 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.

Learning
Duo
Which line is one complete JavaScript statement?
let score = 0let score = 0;
Matches
let name = "Sam"; let age = 13; console.log(name);
↓
Three statements are squashed onto one line. Put one statement per line so the code is easier to read.
Applying
Meanings
Term
let score = 0;
Meaning
A statement is one instruction in JavaScript, usually written on its own line and ended with a semicolon (;). This line is one statement.
Practice
let score = 0;
Testing
Gaps
score = 0;
Check Answer
Spots
1let name = "Sam";
2let age = 13

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Barreleye Fish' badge — Clear Vision, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which line is one complete JavaScript statement?
A. let score = 0
B. let score = 0; ✓
A statement is usually ended with a semicolon (;). The first line is a complete statement.
2. What usually goes at the end of a JavaScript statement?
A. A semicolon (;) ✓
B. A colon (:)
Semicolons mark the end of an instruction. Colons are used for other things, like object properties.
3. Which is the better way to write two statements?
A. let a = 1; let b = 2; ✓
B. let a = 1; let b = 2; console.log(a);
Writing one statement per line makes code easier to read and to debug.
4. How many statements are in this line? console.log('Hi');
A. Two statements
B. One statement ✓
The whole call to console.log() is a single instruction, so it is one statement.
5. Which one is a block of code rather than a single statement?
A. if (x > 5) { console.log(x); } ✓
B. console.log(x);
A block is wrapped in curly braces { } and can hold several statements. A single instruction like console.log(x); is just one statement.

Match the Pairs

let score = 0; → One statement: a single instruction on its own line, ended with a semicolon
console.log(score); → A separate statement that shows the value of score in the console
Write one statement per line, with a semicolon at the end of each → let lives = 3; lives = lives - 1;
A block in curly braces holds statements, and each statement inside still ends with a semicolon → if (score > 10) { console.log("Win"); }
let name = "Sam"; let age = 13; console.log(name); → Three statements are squashed onto one line. Put one statement per line so the code is easier to read.
let points = 5 console.log(points); → The first statement is missing its semicolon at the end. It should be let points = 5;

Key Term

let score = 0;
A statement is one instruction in JavaScript, usually written on its own line and ended with a semicolon (;). This line is one statement.

Fill in the Blanks

1. let score = 0;
Hint: Type the keyword that creates a new variable in this one-line statement.
2. let lives = 3; console.log(lives);
Hint: Type the variable name created on the line above, so the second statement prints it.
3. let a = 5; let b = 7; let total = a + b;
Hint: Type the arithmetic operator that adds the two variables. Each statement ends with a semicolon.
4. if (score > 5) { console.log("You win!"); }
Hint: Type the function name that prints a message. This statement sits inside the block.
5. let total = 0; total += 5; console.log(total);
Hint: Type the shorthand operator that adds to a variable. Each statement is on its own line.

Spot the Error

Question 1
A let name = "Sam";
B let age = 13
C console.log(name, age);
Line B — The statement 'let age = 13' has no semicolon at the end. Each statement should finish with a semicolon: let age = 13;
Question 2
A let score = 0;
B score = score + 5:
C console.log(score);
Line B — The statement ends with a colon (:) instead of a semicolon (;). It should be score = score + 5;
Question 3
A let a = 4;
B let b = 6;
C let total = a + b;
D console.log(total),
Line D — A comma does not end a statement. The line must end with a semicolon: console.log(total);
Question 4
A let a = 1;
B let b = 2;
C console.log(a);
D console.log(b;)
Line D — The semicolon is inside the brackets, so the call is broken. The semicolon goes after the closing bracket: console.log(b);
Question 5
A let temp = 30;
B if (temp > 25) {
C console.log("Hot")
D }
Line C — The statement inside the block is missing its semicolon. Each statement in a block still needs one: console.log("Hot");

Student with a class code? Join your class →