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

I Just started coding like a day ago and I don't know anything about it. Stuck on the first quiz it self. Help me please

Guys, I really want to go somewhere in life with coding. I just started learning, it probably is too late but I have to start somewhere. I am on the first quiz where it asks you to (create a constant named bestSmartphone and assign it to string "iPhone" ) I tried multiple things, didn't work. Please help me out.

2 Answers

you create constants in swift using the let keyword and assign them a value using the = operator:

let someConstant = "some value"
let pi = 3.14
let myName = "Stone"

in this case you need to create a constant named bestSmartphone and assign it a value of "iPhone"

let bestSmartphone = "iPhone"

thank you so much, stone.

no problem. if you have any other trouble just post a question. Generally when you get stuck its a good idea to go back through the video one more time to see if there is anything you missed or to refresh your brain with the information before posting a question, most of the time you will be able to figure it out on your own if you do that first, and if not then post a question.

Don't give up on coding. Just like learning any new thing, coding will get frustrating at times. If it is something you really want to do in your life, keep going with it. Pay attention to the videos and if you are still stuck on anything you have an amazing community in the forums to help you. Just don't give up.