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

1 of 3 Challenge Tasks Create an array named 'booksArray' with the following book titles: 'Hamlet', 'King Lear', 'Othello', 'Macbeth'.

is there anything wrong with my code?

self.booksArray = [NSArray arrayWithObjects:@"Hamlet",@"King Lear",@"Othello",@"Macbeth",nil];

What lesson is this?

2 Answers

For the code challenge, yes. The left side of your equation needs some work.

whats the matter with it? how do i know when im suppose to use self on the code challenges?

Rashii you may want to go read some Objective C primers before jumping into iOS development.

Rashii Henry, you won't need to use self in the code challenges. At least I haven't had to so far and I'm just a few lessons ahead of you.

okay, i believe thats where i was confused.

Ernest, where would i find those?

If you simply remove self from Rashii's statement above it doesn't work. What am I missing?

i think i put on the left side

NSArray *booksArray =