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

Michael Southon
Michael Southon
1,951 Points

Challenge Task 1 of 3

I'm getting an error message when I enter this code in response to the challenge: todo.append("Debug App", "Fix Bugs")

I don't understand why this doesn't work because the syntax is the same as what I used in the playground:

todo.append("Edit Blogpost")

Thanks for your help!

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

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

change

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

to

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

Note: I know this is correct for sure because I had the same problem (and I solved it with that)

1 Answer

Michael Southon
Michael Southon
1,951 Points

Thanks so much! It worked. Great to get such a rapid response!

Thanks! Hope it helped. (lol, I got the same error, and I figured it out. XD)