← JavaScript

console.log()

Prints a value or message to the browser or terminal console for debugging or output.

Understanding console.log() in JavaScript

What it does: console.log() is exactly this method. Commas let console.log() print several values at once. JavaScript is case-sensitive - 'console' must be lowercase. The value to print must go inside round brackets. The correct method name is 'log', not 'print'. Every opening parenthesis needs a matching closing one. JavaScript booleans are lowercase: true and false. This code prints the string "Hi!" to the console.

Common mistakes: 'console' must be lowercase - a capital C causes an error. 'console' is misspelled as 'consle'.

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 1–10) and word search (Modules 1–29).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Does console.log() print output to the console?
YesNo
Matches
Console.log("Hi");
↓
Wrong - 'console' must be lowercase
Applying
Meanings
Term
console.log()
Meaning
Prints a value or message to the browser or terminal console for debugging or output.
Practice
console.log("Hello, world!");
Testing
Gaps
("Hi!")
Check Answer
Spots
1Console.log("Hi");
2console.log("Bye");

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

The 'Owl' badge — Wise Coder, 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. Does console.log() print output to the console?
A. No
B. Yes ✓
console.log() is used to print values for debugging or output.
2. Is 'Console.log' with a capital C correct syntax?
A. No ✓
B. Yes
JavaScript is case-sensitive - 'console' must be lowercase.
3. Can console.log() print multiple values separated by commas?
A. No
B. Yes ✓
console.log(1, 2, 3) prints all three values at once.
4. Does console.log() require parentheses around its value?
A. Yes ✓
B. No
The value to print must go inside round brackets.
5. Is 'console.print()' a real JavaScript method?
A. No ✓
B. Yes
The correct method name is 'log', not 'print'.

Match the Pairs

console.log("Hi!") → Prints "Hi!" to the console
console.log(5 + 2) → Prints the result of 5 + 2
The method used to print output to the console → console.log()
Prints multiple values separated by commas → console.log(1, 2, 3)
Console.log("Hi"); → Wrong - 'console' must be lowercase
console.log("Hi); → Wrong - the string is missing its closing quote

Key Term

console.log()
Prints a value or message to the browser or terminal console for debugging or output.

Fill in the Blanks

1. console.log("Hi!")
Hint: Type the console method that prints to the console.
2. console.log("Bye!")
Hint: Type the method name that comes after 'console.'.
3. console.log(5 + 2)
Hint: Type the console method that prints to the console.
4. console.log(score)
Hint: Type the method name that comes after 'console.'.
5. console.log(name)
Hint: Type the console method that prints to the console.

Spot the Error

Question 1
A Console.log("Hi");
B console.log("Bye");
C console.log(5);
Line A — 'console' must be lowercase - a capital C causes an error.
Question 2
A consle.log("Yo");
B console.log(1);
C console.log(2);
Line A — 'console' is misspelled as 'consle'.
Question 3
A console.log(1);
B console.log 2;
C console.log(3);
D console.log(4);
Line B — Missing parentheses around the value to print.
Question 4
A console.log("A");
B console.print("B");
C console.log("C");
D console.log("D");
Line B — 'print' isn't a real console method - use 'log' instead.
Question 5
A let x = 1;
B console.log(x);
C console.log(x;
D let y = 2;
E console.log(y);
Line C — Missing closing parenthesis before the semicolon.

Student with a class code? Join your class →