Ans :
- enum Beverage: CaseIterable {
- case coffee, tea, juice
- }
- let numberOfChoices = Beverage.allCases.count
- print("\(numberOfChoices) beverages available")
- for beverage in Beverage.allCases {
- print(beverage)
- }
what does mean by "fast enumaration" ? can you please explain?
ReplyDeletefor in enumerate faster than for ... . So in swift, apple called it fast enumeration way.
Delete