December 2018
Intermediate to advanced
414 pages
10h 19m
English
Dictionaries are collections; literally, Dictionary conforms to the collection type. Therefore, it gains lots of the features of collections.
The element type of the [Key: Value] collection is a (Key, Value) tuple.
Let's take a look at the different syntax, as follows:
for (key, value) in swiftReleases { print("\(key) -> \(value)")}// Output:2016-09-13 -> Swift 3.02015-09-21 -> Swift 2.02017-09-19 -> Swift 4.02015-04-08 -> Swift 1.22014-09-09 -> Swift 1.02014-10-22 -> Swift 1.12018-03-29 -> Swift 4.1
swiftReleases ...Read now
Unlock full access