Ray Wenderlich Functions and Types Course - Part 6
Two days in a row baby! We're onto enumerations first. I want to get a couple more entries this week to finish this course, consolidate then explore more on rw.com. Start Time - 18:50 Intro Enums take advantage of type safety - options to choose from. They are value types. Enums Mostly recap here. Case syntax, raw values. Own raw values can be put in. enum Month : Int { case january = 1 , february , march , april , may , june , july , august , september , october , november , december } let month = Month . january func monthsUntilChristmas (from month: Month ) -> Int { Month . december . rawValue - month. rawValue } enum Season : String , CaseIterable { /// ❄️ case winter /// 🌾 case spring /// 🌞 c...