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 trialKenneth Low
430 Pointsunsure what i'm doing wrong
Im just unsure what I'm doing wrong.
var todo: [String] = ["Learn Swift","Build App","Deploy App"]
println("Items on todo list: \n todo.count")
2 Answers
Chris Shaw
26,676 PointsHi Kenneth,
You have the correct answer in your println
statement, however, you've added a string before it which isn't required. The challenge is simply asking for you to print the count for todo
which we can do using the below.
println(todo.count)
Happy coding!
David Valles
9,367 PointsYou are printing "Items on todo list: \n todo.count"
the variable todo needs to be outside the " ". You dont need to display the message and your variable is not really a variable inside " ", it's just a string. the correct answer would be
println( todo.count)