Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1console.log("Hi"); | Aconsole.log("Done"); | |
| 2{ console.log("Go"); } | BThe capital letters in Console and Log are wrong. JavaScript is case-sensitive, so it must be console.log. | |
| 3JavaScript is case-sensitive, so the word console must be all lowercase. | CCorrect: console.log is all lowercase, and the opening quote and bracket each have a matching closing one. | |
| 4Every opening round bracket ( must be closed with a matching ). | Dconsole.log("Hello"); | |
| 5Console.Log("Hi"); | EEvery opening curly brace { is matched by a closing brace }, and the round brackets and quotes inside are paired too. | |
| 6console.log("Hi); | FThe opening quote has no matching closing quote after Hi, so the string is never finished. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
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.console.log("Hello");console.log("Ready");if (score > 5) {
console.log("Win");
}let name = "Mia";
console.log(name);function sayHi() {
console.log("Hi");
}