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

Newbie Question- Creating a String

Hey everyone! I am pretty retarded when it comes to coding. This is my very first time ever doing anything like this and I kinda need help.

I know this is a newbie question but what am I missing in the very first Code Challenge in the IOS platform. This is what I have, and it keeps saying it's wrong.

(Create a String Challenge)

NNString *myString= @ "iPhone island";

This is what I have and it keeps saying it is wrong :/

If someone could help that would be great

2 Answers

David Kaneshiro Jr.
David Kaneshiro Jr.
29,247 Points

NNString should be NSString and there shouldn't be a space between the @ symbol and "iPhone Island".

Ok so this is what I put in and it's still not working. Thank you so much for helping me

NSString *myString= @"iPhone island";

It's still not working :/

David Kaneshiro Jr.
David Kaneshiro Jr.
29,247 Points

I don't see anything wrong with what you have What exactly is the question asking? Because if you don't type out certain values or variable names exactly the way the question asks it won't let you pass.

"Code Challenge: Create a String" 1 objective

Create a string named 'treehouse' with a value of 'Treehouse'. Important: The code you write in each task should be added to the code written in the previous task. Recheck Work Bummer! Your 'treehouse' variable has the wrong value in it. Check the task instructions again.

string_assignment.mm

1 NSString *treehouse= @"treehouse";

I figured it out!

I didn't have the "t" capitalized. Thank you so much for the help. You can tell I'l a noob!

Thanks again for the help!