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 trialMichael Kolkebeck
2,878 PointsThe for-in loop challenge task does not compile in editor, but does in Xcode
My code...
for number in 1...10 { println("(number) * 7 = (number*7)") }
And I get this error...
swift_lint.swift:5:30: error: 'countElements' has been renamed to count let range = NSMakeRange(0, countElements(string)) ^~~~~~~~~~~~~ count Swift.countElements:1:36: note: 'countElements' has been explicitly marked unavailable here @availability(*, unavailable) func countElements(x: T) -> T.Index.Distance ^
2 Answers
Joe Dayvie
11,956 PointsHello,
Are you putting the slashes before the (number) in the code? Otherwise it looks good and works for me.
Joe Dayvie
11,956 PointsMichael,
I would say to refresh and go back to the quiz and see if it will accept your answer then - Sometimes that has happened to me :)
Michael Kolkebeck
2,878 PointsA refresh did not work. I also cleared all history and cookies. It seems like someone clobbered the backend.
This is the last module before going on to the next track.
Know any way how to skip it and move on?
Michael Kolkebeck
2,878 PointsDisregard the last question. I found that I can just take the next course off-track.
Michael Kolkebeck
2,878 PointsMichael Kolkebeck
2,878 PointsAh, yea, the slashes are there. The formatting of the slashes did not take very well in the forum. I think it's a problem with the backend, since I get the compile error even with a simple var statement.