Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Swift Basics (retired) Collections Modifying an Array

John Moron
John Moron
1,658 Points

Please remove the third item ("Deploy App") and assign it to a constant named item.

They want me remove the third item ("Deploy App") and assign it a constent? but don't know how. Please help!

arrays.swift
var todo = ["Learn Swift", "Build App", "Deploy App"]
todo.append("Debug App")
todo.append("Fix Bugs")

2 Answers

Dominic Bryan
Dominic Bryan
14,452 Points

I think I just answered this for you on another question you posted ahah. But just to clarify

let item = removeAtIndex(2)

Please tick this as answer because this is being asked a few times

John Moron
John Moron
1,658 Points

I tried that and it says its wrong do have to add the Deploy App to it

John Moron
John Moron
1,658 Points

No thats what i need actually!! I posted it again cuz know one was helping me.