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 Basics (retired) Collections Modifying an Array

Brittany D
Brittany D
1,767 Points

When using .append can you not put in more than one string/bool/int etc. in the parameter?

Not sure what I am doing wrong

arrays.swift
var todo = ["Learn Swift", "Build App", "Deploy App"]

todo.append ("Debug App", "Fix App")

todo += ["Debug App", "Fix App"]

1 Answer

Jhoan Arango
Jhoan Arango
14,575 Points

Hello:

When using the append method you can only add one item at a time, For a better explanation you can click Here, where someone had a similar question.

let me know if you understand better after.

Brittany D
Brittany D
1,767 Points

Ok, thank you. I eventually figured it out after a few hours.