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

iOS Swift 2.0 Collections and Control Flow Control Flow With Conditional Statements Logical Operators

Raphael Reiter
Raphael Reiter
6,820 Points

Challenge is Logical operators swift 2.0

Can someone explain to me how to append again? and what does it mean exactly, i'm all fuzzy on that term. thanks!

2 Answers

Richard Lu
Richard Lu
20,185 Points

Hi Raphael,

I'm assuming that you want to know what it means to append an item onto a collection like an array. For example, you have list of things to get done, but you realize that you need to add something so you add it to the end of the list - that's an append. Here's an example of how to use append:

var list = ["buy grocery", "do the laundry", "sleep"]  // list as an array of task to complete
let task = "eat"   // another task to do
list.append(task)  // add that to the list of task to do

Happy Coding! :)

Raphael Reiter
Raphael Reiter
6,820 Points

thanks Richard. All is completely clear now