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
Alejandro Reyes
Courses Plus Student 1,927 PointsInsert on the todo array
I m having trouble answering this, I dont understand why is this wrong, someone help?
var todo = ["Learn Swift", "Build App", "Deploy App"]
todo.append("Debug App")
todo.append("Fix Bugs")
todo.removeAtIndex(1)
let item = todo.removeAtIndex(1)
todo.insert("Learn iOS", atIndex: 1)
It says "Your todo variable has the wrong value in it"
Please Help!
jamescool
44,592 Pointsjamescool
44,592 PointsIt's hard to assist you, because there is no link to the task you're working on.
The code you've written runs fine, so it's likely you've just slipped up somewhere. Here are a few guesses: 1) Is your capitalization correct? 2) Are you trying to make "Learn iOS" the second element, because this is what you've coded. 3) Might you have a rogue removeAtIndex() function? Is the exercise really asking you to remove "Build App" and then to remove "Deploy App"?
Hope you're able to get the answer!