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 | |
|---|---|---|
| 1studentScore | AA camelCase variable name: first word lowercase, later word capitalised, no spaces | |
| 2class BankAccount: | BThe first word is capitalised. In camelCase a variable should start lowercase: studentScore. | |
| 3A camelCase name for a variable holding a player's total points | CA PascalCase class name: every word starts with a capital letter, including the first | |
| 4A PascalCase name for a class that models a library book | Dclass LibraryBook: | |
| 5StudentScore = 85 | EThe name has a space in it. Camel casing joins words with no spaces: studentScore. | |
| 6student score = 85 | FtotalPoints = 0 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
camelCase — A naming style with no spaces: the first word is lowercase and each later word starts with a capital letter, like studentScore. PascalCase also capitalises the first word.let studentScore = 85;
console.log(studentScore);class StudentRecord {}
let record = new StudentRecord();let highScore = 90;
console.log(highScore);let mathsMark = 70;
let englishMark = 80;
let totalMarks = mathsMark + englishMark;let firstName = "Ava";
let lastName = "Nguyen";
let fullName = firstName + " " + lastName;