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 trialsapanbhuta
2,933 PointsDifficulty answering
Hi I can't figure out part 3 (line 3) of this challenge. Here's what I wrote:
NSArray *booksArray = [NSArray arrayWithObjects:@"Hamlet",@"King Lear",@"Othello",@"Macbeth",nil]; NSString *bookTitle = [booksArray objectAtIndex:2]; [self.bookTitle uppercaseString];
Thanks for your help!
3 Answers
Patrik Balogh
47,986 PointsHi! Change self.bookTitle to bookTitle at the end (before uppercaseString).
Jimmy Hsu
6,511 PointsI believe bookTitle
doesn't need self
to be called. I don't believe it's necessary as bookTitle is within the same scope.
Remove the self.
from self.bookTitle
and it should work.
NSArray *booksArray = [NSArray arrayWithObjects:@"Hamlet", @"King Lear", @"Othello", @"Macbeth", nil];
NSString *bookTitle = booksArray[2];
[bookTitle uppercaseString];
Patrik Balogh
47,986 PointsReally Jimmy Hsu?! WOW. Good idea....... :S((
Jimmy Hsu
6,511 PointsI'm sorry?
I didn't see your reply as replies and comments do not dynamically update as I type them. I also thought it would be more help as to explain what went wrong, as understanding the issue and where you went wrong is crucial to learning.
sapanbhuta
2,933 PointsAwesome thanks for the help guys! It worked :)