Forums
Learn
Careers
Store
About
SUBSCRIBE
TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>
Question 1/6: Which of these create enums with an associated value?
Hint: Associated values let you attach extra properties to any or all of your enum cases. Click to show.
Option 1:
enum Building { case skyscraper(floors: Int) }
This creates a case called skyscraper with the associated value floors.
skyscraper
floors
Option 2:
enum role { case administrator }
This enum has no cases with associated values.
Correct!
Oops – that's not correct.
Return to Review Menu
You are not logged in
Link copied to your pasteboard.