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
Micah Elias
2,774 PointsHelp With Code Challenge
I need help with the first Blog Reader app code challenge. This is my code:
self.booksArray = [NSArray arrayWithObjects:@"Hamlet", @"King Lear", @"Othello", @"Macbeth", nil];
It is giving me the error " Make sure you created an array with the correct variable name, and check your syntax!"
Please help!
2 Answers
Amit Bijlani
Treehouse Guest TeacherThere is no property so you cannot use the word self. You have to declare the variable booksArray like you would any local variable.
NSArray *booksArray = [NSArray arrayWithObjects:@"Hamlet", @"King Lear", @"Othello", @"Macbeth", nil];
Micah Elias
2,774 PointsThank you!