What is the output?
enum Status: Int {
case pending = 1
case active = 5
case done = 10
}
let s = Status.active
print(s.rawValue)
print(Status.done.rawValue)
Try it in the online Swift Playground →
[spoiler title="Solution"]
Answer:
5 10
Explanation:
Raw values provide underlying primitive values for enum cases.
[/spoiler]