console.log(), online
Six activities your students do on their own devices. See who's finished, and their scores.
Learning
Understanding
Testing
console.log() in one minute
What students need to know
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.
Mistakes students make
- 'console' must be lowercase - a capital C causes an error.
- 'console' is misspelled as 'consle'.
- Missing parentheses around the value to print.
- 'print' isn't a real console method - use 'log' instead.
YOU ARE HERE · MODULE 1console.log()
NEXT · MODULE 2Comments
What students will learn in this module
Every question in Module 1
Quick questions
- Does console.log() print output to the console?ANoBYes
- Is 'Console.log' with a capital C correct syntax?ANoBYes
- Can console.log() print multiple values separated by commas?ANoBYes
- Does console.log() require parentheses around its value?AYesBNo
- Is 'console.print()' a real JavaScript method?ANoBYes
Key terms
Students type the meaning of:
console.log()
Match the pairs
console.log("Hi!")Match it to what it doesconsole.log(5 + 2)Match it to what it doesThe method used to print output to the consoleMatch it to what it doesPrints multiple values separated by commasMatch it to what it doesConsole.log("Hi");Match it to what it doesconsole.log("Hi);Match it to what it doesFill in the blanks
___________("Hi!")Hint: Type the console method that prints to the console.
console.___("Bye!")Hint: Type the method name that comes after 'console.'.
___________(5 + 2)
Hint: Type the console method that prints to the console.
console.___(score)
Hint: Type the method name that comes after 'console.'.
___________(name)
Hint: Type the console method that prints to the console.
Spot the error
Question 1
AConsole.log("Hi");Bconsole.log("Bye");Cconsole.log(5);
Question 2
Aconsle.log("Yo");Bconsole.log(1);Cconsole.log(2);
Question 3
Aconsole.log(1);Bconsole.log 2;Cconsole.log(3);Dconsole.log(4);
Question 4
Aconsole.log("A");Bconsole.print("B");Cconsole.log("C");Dconsole.log("D");
Question 5
Alet x = 1;Bconsole.log(x);Cconsole.log(x;Dlet y = 2;Econsole.log(y);
