Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMartin Wildfeuer
Courses Plus Student 11,071 PointsTypo in Assignment
Firstly, the assignment is described as...
Assign an enum value to type South to a constant named Direction, by using a raw value with its initializer method.
...where the uppercase constant Direction should be lowercase direction instead.
Code check is only passed with lowercase direction as expected.
enum Compass: Int {
case North = 1
case South
case East
case West
}
let Direction = Compass(rawValue: 2) // Nope
let direction = Compass(rawValue: 2) // Yes
Secondly, I find the above sentence quite confusing, shouldn't it be more like:
Assign the enum value South of enum Compass to a constant named direction, by using a raw value with Compass' initializer method.
Jay Padzensky
4,731 PointsHi Martin,
Thanks for sharing this with us! I'm forwarding this thread to our teaching team so they can take a look. We appreciate the heads up!
Pasan Premaratne
Treehouse TeacherSorry for the trouble! This has been fixed
Baran Ozkan
8,818 PointsI always try to figure the challenges out myself, and it was just a waste of time trying to understand the question. Thanks Martin, that was quite helpful!
Dennis Parussini
Treehouse Project ReviewerDennis Parussini
Treehouse Project ReviewerYeah, I found it a bit confusing too. Had to try it twice and read the assignment three times before I found out what they want.