Question: Swift Programming Language 1. Swift provides three primary collection types: Arrays, Sets, and Dictionaries. Match the collection type on the left to the way the
Swift Programming Language
1. Swift provides three primary collection types: Arrays, Sets, and Dictionaries. Match the collection type on the left to the way the collection is organized on the right.
Array a) Unordered collection of key- value pairs b) Unordered collection c) Ordered collection
Dictionary a) Unordered collection of key- value pairs b) Unordered collection c) Ordered collection
Set a) Unordered collection of key- value pairs b) Unordered collection c) Ordered collection
3.
If you assign an array, a set, or a dictionary to a constant, that collection is which of the following?
| immutable (its size and contents cannot be changed) |
| mutable (its size and contents can be changed) |
4.
You can create an array in Swift by adding two arrays together. For example, if there are two arrays of names called names1 and name2, the following is allowed:
var allNames = names1 + names2
| True |
| False |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
