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!
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
Create a constant named language and assign it a string "Swift"
how do i solve the question
var str = "Swift"
You are on the right track you need to use let to declare a constant variable...
let language = "Swift"
Bao PhamCourses Plus Student 240 Points
I just passed the first session as of now. I didn't understand it at first when I attempted to write the string because of simply the site does not behave exactly like the program "Xcode". I am not giving you the answer here, but when you are supposed to declare the string in reference to "Implicit types" the site does not automatically capitalize the declaration as the system running Xcode does. Had me scratching my head quite a bit haha.
Basically when writing a string you learned at first to write "var" indicating the word (Or terms, abbreviations,etc.) after is the variable. Now, modifying the string line into a "Constant" would be using "let" instead.