Welcome to the Treehouse Community
Looking to learn something new?
Mehran Amini Tehrani1,523 Points
How can I print out the number of items in the todo array using println? I know for counting I need to write for example: todo. count, but it does not work.
var todo = ["Learn Swift", "Build App", "Deploy App"] todo. count
The println function prints the value as a string.
var todo = ["Learn Swift", "Build App", "Deploy App"] println(todo.count)
Remember that the ebook "The Swift Programming Language" by Apple is a great (and free) resource on Swift, and you can learn a lot just by skimming through the first chapter.