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 trialRea Rahhal
Courses Plus Student 4,732 Pointsyour code could not be compiled... what's wrong here?
The constant declaration is right, what am I missing ?
enum Compass: Int {
case North = 1
case South = 2
case East = 3
case West = 4
}
//let direction = Compass(rawValue: 2)
//let direction = Compass.South.rawValue
let direction = Compass(rawValue: 2)
1 Answer
Dave Harker
Courses Plus Student 15,510 PointsHi Rea Rahhal,
Nothing really wrong with the code per se.
The task however requires all lower case enum members i.e south not South
Nice work by the way ... you nailed it!! (just change the capitisation on the enum members)
Dave
Dave Harker
Courses Plus Student 15,510 PointsDave Harker
Courses Plus Student 15,510 PointsRea Rahhal — You can mark the question solved by choosing a "Best Answer".
And happy coding!