Dictionaries in Swift

Swift

Recently, I have been learning and coding in Swift. Swift is a powerful and general-purpose language. As a seasoned Java developer, I can correlate some of the Swift's concepts and it is easy to learn.

In this article, I would like to introduce and delve into the dictionary in Swift. Dictionary is a container which stores key-value pairs. All the keys in the dictionary are of the same type and all the values are of the same type. The order in the dictionary is not maintained. If you are a Java developer, you can correlate this to a Hashtable which gives fast access to its entries.