Forums
Learn
Careers
Store
About
SUBSCRIBE
GO FURTHER, FASTER: Try the Swift Career Accelerator today! >>
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.