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 trialJohnathan Daniel
3,193 Pointsmy code is not working
NSString *color = @"Purple"; NSString * preference = @"My favorite color is "; NSString *favorite = [[preference stringByAppendingString:color]]
I need help with line 3, can someone guide me in the right direction?
1 Answer
Stone Preston
42,016 Pointsyou have too many brackets around your method call. you only need one set of brackets per method
NSString *favorite = [preference stringByAppendingString:color];