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!
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
Brian Chewning
7,270 Pointscode challenge: Mutable vs. Immutable 3 of 4
I can not figure out what I am missing:
NSMutableArray *elements = [NSMutableArray arrayWithCapacity : 0];
elements = [NSMutableArray arrayWithObjects:@"Helium", @"Neon", @"Argon", nil];
elements = [title removeObjectAtIndex: 1];
4 Answers

John Hill
Front End Web Development Techdegree Graduate 35,236 PointsWatch the video, you must. The answers you seek lie deep within you (@~3:15 in the video).
NSMutableArray *elements = [NSMutableArray array];
elements = [NSMutableArray arrayWithObjects:@"Helium", @"Neon", @"Argon", nil];
[elements removeObjectAtIndex: 1];
[elements removeLastObject];

Amit Bijlani
Treehouse Guest TeacherBrian your array is called elements
so why in your last line are you calling the method removeObjectAtIndex
on something called title
? It should be called on elements
.

Brian Chewning
7,270 PointsGot it thanks.
DAKSHISH PATEL
1,015 Pointsi don't get it, please can you kindly advise the 3rd & 4th challenge answers so that i can complete the test
DAKSHISH PATEL
1,015 Pointshello?