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

Please what is the error in this code... todo.append("Debug App","Fix Bugs")

I am getting an error and cant seem to figure out what is wrong

Thanks Heath

1 Answer

Jake Adams
Jake Adams
1,608 Points

You can only pass 1 argument in to .append(), so you will need to use 2 .append() statements

Thanks a lot.

or you could just do this

todo += ["Added String", "Added String 2"]

and basically just assign the new array to you original todo array