Dictionaries In Swift

What’s a Dictionary? You can use a dictionary to store a collection of key-value information in your app. A dictionary is similar to an array in the sense that both store lists, also called collections, of items of the same type. A dictionary is a fundamental collection in Swift programming. With a dictionary you can store key-value data in your app. It’s a collection type, similar to array and sets, but completely different too. Let's see an example:- Here’s an example of a dictionary: The type of the scores dictionary is [String: Int]. That means that the type of the keys in the dictionary is String, and the type of its values is Int. In the above example we haven’t explicitly provided the t...