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 Swift 2.0 Basics An Introduction to Swift Programming Working With Variables

I keep getting the message telling me that my code can't be complied. I do not know what it wants me to do.

Challenge Task 1 of 2: Declare a variable named language and assign the string "Swift". We didn't go over the specific syntax for creating a String so remember to start with a double quote, write the word, and close it with a double quote.

// var language = "Swift"

Just wondering: did you mean for the line to be a comment?

1 Answer

Travinna Nerestant
Travinna Nerestant
1,609 Points
// var language = "Swift"

What you have written above would be a comment. It's a great way to leave notes for other developers working on the same project. Simply remove // and it will become the variable.

It will look like this:

var language = "Swift"

Happy Coding!