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

What am I doing wrong here?

Does anyone know what I'm doing wrong here?

(This is from the Treehouse Module on Swift)

alt text

https://www.dropbox.com/s/2m1zv9vxgfxcrv8/Screen%20Shot%202014-09-24%20at%2021.19.44.png?dl=0

2 Answers

There seems to be some bugs with this challenge, specifically task 2.

First issue you have, is that it your

todo.removeAtIndex()

is incorrect. It asks for the third item to be removed, and you're removing the second one. This is the bug: it shouldn't have accepted your answer.

Second issue is that you're removing the item, then trying to remove it again while assigning it to the variable "item".

let item = todo.removeAtIndex(#)

will remove and assign the value at the same time.

Hope that helps. Maybe Amit Bijlani can look into the busted checks of Task 2.