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 trialALEKSANDR KONAKOV
Courses Plus Student 2,555 PointsWorks in a playground - doesn't work here
enum Compass: Int {
case North = 1
case Sounth
case West
case East
}
let direction = Compass(rawValue: 2)
Any idea?
2 Answers
Steve Hunter
57,712 PointsHi there,
I had a look at this challenge and found that this code worked (added commas between cases) - I am sure there are other solutions that will also pass the test:
enum Compass: Int{
case North = 1,
South,
East,
West
}
let direction = Compass(rawValue: 2)
I hope that helps.
Steve.
ALEKSANDR KONAKOV
Courses Plus Student 2,555 PointsShame on me for that typo, thanks for mentioning this.
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsThis does too - I think you mis-spelt
South
which is causing the issue: