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 trial
Gary Leong
2,888 PointsCollections Challenge Help!
Print out the number of items in the todo array using println.
var todo : [String] = ["Learn Swift", "Build App", "Deploy App"] var a = todo.count println ("(a)")
Been mulling over this for hours, really not sure what mistake I made.
2 Answers
Joe Dayvie
11,956 PointsHello!
I just completed the challenge you are discussing and you have an extra step. You don't need to create a variable for todo.count - Call todo.count directly in the println function to have it appear and you will pass =) Remember to not have only one set of parenthesis for the println function and you do not need quotes.
Gary Leong
2,888 Pointsomg, classic example of thinking too much. Thank you very much Joe!!!
Joe Dayvie
11,956 PointsI am the same way sometimes - No problem & thank you =)