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 trialSamuel Booth-Aalund
552 PointsIt wants me to do a count on the items in the lists and when I do that and hit Recheck work it says bummer try again.
I made the list, did the println("todo"), then it wants me to do the count so I did then when i check work it just says Bummer! Try again! nothing else and no errors
var todo: [String] = ["Learn Swift","Build App","Deploy App"]
println("todo")
todo.count
1 Answer
Jason Anders
Treehouse Moderator 145,860 PointsHey Samuel,
The second part of the challenge wants you to "Print out the number of items in the todo array using println."
Right now, you are only printing the string "todo". And the last line of code is just dangling there. You just need to move the todo.count
into the println
method to print the count.
var todo: [String] = ["Learn Swift","Build App","Deploy App"]
println(todo.count)
Hope that helps to make sense. Keep Coding! :)
Samuel Booth-Aalund
552 PointsSamuel Booth-Aalund
552 PointsOHHHH, dang it...Thank you very much i'll remember that from now on!
Reed Carson
8,306 PointsReed Carson
8,306 PointsI'd recommend you take the Swift 2.0 course. Theres no point in learning outdated material. for instance, println doesnt even exist anymore. Its now just "print".
Swift is a new language and is thus rapidly evolving with major changes. 3.0 will be out soon, and even more of Swift 1.0 will be outdated
Samuel Booth-Aalund
552 PointsSamuel Booth-Aalund
552 PointsI will take a look at it then for sure. Thank you and I appreciate the help!