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 | |
|---|---|---|
| 1"Hi " + name | AWrong - concatenation uses +, not - | |
| 2first + " " + last | BJoins first, a space, and last into one string | |
| 3Combines two strings into one using + | Cgreeting + "!" | |
| 4Joins a string literal with a variable's value | D"Age: " + age | |
| 5let msg = "Hi " - name; | EWrong - only one + is needed to join two values | |
| 6let z = x + + y; | FJoins the string "Hi " with the value of name |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
+ — Joins two strings together into one when used between them.let msg = "Hi " + name;let full = firstName + lastName;let years = "Age: " + age;let combo = a + b + c;let msg2 = greeting + "!";