← ACARA Digital Technologies Years 7–8

Typing code exactly: case, spelling and paired symbols

JavaScript is case-sensitive, so console.log must be typed exactly. Every opening quote, bracket or brace needs a matching closing one, like the quotes and ( ) here.

Understanding Typing code exactly: case, spelling and paired symbols in ACARA Digital Technologies Years 7–8

What it does: Typing console in lowercase matches the name JavaScript knows. Console would cause an error. The ( after log is closed by ) before the semicolon, so the brackets are matched. JavaScript is case-sensitive. The keyword must be lowercase let. Let with a capital L is not recognised. Every opening quote needs a closing quote. The wrong line opens a string but never closes it. Misspelt keywords cause errors. The keyword is function, spelled exactly like that. The braces, round brackets and quotes are all paired, so this code is typed correctly.

Common mistakes: The string "Age: " is missing its closing quote, so the quote pairs are mismatched. It should be console.log("Age: " + age);. JavaScript is case-sensitive, so the keyword must be lowercase. Let is not the same as let. It should be let score = 10;.

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 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.

Learning
Duo
Which line will run correctly in JavaScript?
console.log("Hi");Console.Log("Hi");
Matches
Console.Log("Hi");
↓
The capital letters in Console and Log are wrong. JavaScript is case-sensitive, so it must be console.log.
Applying
Meanings
Term
console.log("Hi");
Meaning
JavaScript is case-sensitive, so console.log must be typed exactly. Every opening quote, bracket or brace needs a matching closing one, like the quotes and ( ) here.
Practice
function greet() {
Testing
Gaps
.log("Hello");
Check Answer
Spots
3console.log(name);
4console.log("Age: + age);

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

The 'Oryx' badge — Desert Navigator, 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 will run correctly in JavaScript?
A. Console.Log("Hi");
B. console.log("Hi"); ✓
JavaScript is case-sensitive. Console.Log is not the same as console.log, so it must be typed exactly in lowercase.
2. True or false: JavaScript treats let score = 5; and Let score = 5; as the same thing.
A. False ✓
B. True
JavaScript is case-sensitive. The keyword must be lowercase let. Let with a capital L is not recognised.
3. Which line has matching quotes?
A. console.log("Hello);
B. console.log("Hello"); ✓
Every opening quote needs a closing quote. The wrong line opens a string but never closes it.
4. Which line has its round brackets matched correctly?
A. console.log("Go"); ✓
B. console.log("Go";
Every opening ( needs a closing ). The wrong line never closes the bracket before the semicolon.
5. Which function declaration has its curly braces matched?
A. function hi() { console.log("Hi"); } ✓
B. function hi() { console.log("Hi");
Every opening { needs a closing }. The wrong version leaves the function body open.

Match the Pairs

console.log("Hi"); → Correct: console.log is all lowercase, and the opening quote and bracket each have a matching closing one.
{ console.log("Go"); } → Every opening curly brace { is matched by a closing brace }, and the round brackets and quotes inside are paired too.
JavaScript is case-sensitive, so the word console must be all lowercase. → console.log("Hello");
Every opening round bracket ( must be closed with a matching ). → console.log("Done");
Console.Log("Hi"); → The capital letters in Console and Log are wrong. JavaScript is case-sensitive, so it must be console.log.
console.log("Hi); → The opening quote has no matching closing quote after Hi, so the string is never finished.

Key Term

console.log("Hi");
JavaScript is case-sensitive, so console.log must be typed exactly. Every opening quote, bracket or brace needs a matching closing one, like the quotes and ( ) here.

Fill in the Blanks

1. console.log("Hello");
Hint: Type the object name that comes before .log. JavaScript is case-sensitive, so use all lowercase letters.
2. console.log("Ready");
Hint: Type the method name that prints to the console. It must be spelt exactly and in lowercase, and it is followed by a pair of round brackets.
3. if (score > 5) { console.log("Win"); }
Hint: Type the lowercase keyword that starts a decision. Its condition sits in round brackets and its code sits in a pair of curly braces.
4. let name = "Mia"; console.log(name);
Hint: Type the variable name that is used again inside the brackets on the next line. It must match exactly, including its case.
5. function sayHi() { console.log("Hi"); }
Hint: Type the correctly spelt keyword that declares a function, all in lowercase.

Spot the Error

Question 1
A let name = "Mia";
B let age = 13;
C console.log(name);
D console.log("Age: + age);
Line D — The string "Age: " is missing its closing quote, so the quote pairs are mismatched. It should be console.log("Age: " + age);
Question 2
A Let score = 10;
B score = score + 5;
C console.log(score);
Line A — JavaScript is case-sensitive, so the keyword must be lowercase. Let is not the same as let. It should be let score = 10;
Question 3
A function greet() {
B Console.log("Hello!");
C }
D greet();
Line B — console must start with a lowercase c, and log must be lowercase too. Console.log is not the same as console.log. It should be console.log("Hello!");
Question 4
A for (let i = 0; i < 3; i++ {
B console.log(i);
C }
Line A — The opening bracket ( after for has no matching closing ). It should be for (let i = 0; i < 3; i++) {
Question 5
A let total = 0;
B whlie (total < 3) {
C total++;
D }
E console.log(total);
Line B — The keyword while is misspelt as whlie. JavaScript only understands keywords that are spelt exactly right. It should be while (total < 3) {

Student with a class code? Join your class →