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

Chris McKnight
PLUS
Chris McKnight
Courses Plus Student 11,045 Points

Objective-C Basic NSString Code Challenge

I am doing the code challenge for NSString. The second tasks asks to create another string called preference assign @"My favorite color is" to it. I have the code below but it keeps saying make sure to assign the correct value.

NSString *color = @"Purple";
NSString *preference = @"My favorite color is";

2 Answers

Make sure the text they want you enter is EXACTLY the same as what you have in your code. This includes spaces, punctuation, etc. Maybe there's a space after "is" that should be in your code?

Chris McKnight
Chris McKnight
Courses Plus Student 11,045 Points

Interesting. There is no space in the description but adding the space works. I even copied the text directly from the description. Thanks.

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

Sorry about that. I have made the string comparison more lenient so now you should be able to pass it.