Collection Types

  • swift provides three primary collection types.
    • Array - Arrays are ordered collections of values
    • Set - Sets are unordered collections of unique values
    • Dictionary - Dictionaries are unordered collections of key-value associations

collections swift.png

  • Arrays, sets, and dictionaries in Swift are always clear about the types of values and keys that they can store.