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


Sebastian Nitu
Sebastian Nitu
8,616 Points

NSArray Code Challenge, please help!

Please help me, I am having a hard time passing through the Arrays Code Challenge.

I have tried both:

NSArray *myArray = [[NSArray alloc] initWithObjects:@"Apple", @"Orange, @"Banana",   @"Plum", nil];


NSArray *myArray = [NSArray alloc];

myArray = [myArray initWithObjects: @"Apple", @"Orange, @"Banana", @"Plum", nil];

but I still can't pass the challenge

2 Answers

Amit Bijlani
Amit Bijlani
Treehouse Guest Teacher

Your code is right except that you are missing a closing double quote at the end of Orange

Sebastian Nitu
Sebastian Nitu
8,616 Points

Oh my GOD! :)) THNK YOU! That was so obvious!