Question: what are enums used for in swift?
Answer: An enumeration defines a common type for a group of related values and enables you to work with those values in a type-safe way within your code. ... Enumerations in Swift are much more flexible, and don't have to provide a value for each case of the enumeration.