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 | |
|---|---|---|
| 1new Set() | AWrong - 'Set' must start with a capital S | |
| 2nums.add(1) | Bcolors.add("red") | |
| 3Automatically removes duplicate values from a collection | CSet | |
| 4Inserts a value into a Set | DWrong - 'add' must start with a lowercase a | |
| 5let s = new set(); | ECreates a new, empty Set | |
| 6s.Add(1); | FAdds the value 1 to the nums Set |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
new Set() — Creates a new Set, a built-in object that stores only unique values.let nums = new Set();nums.add(1);let colors = new Set();colors.add("red");nums.add(2);