Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Swift Basics (retired) Types Printing Results

i dont uderstand


let language = "Swift"

1 Answer


Welcome to the beautiful world of coding, it might be a bit hard to understand at first, but as you go I promise you will understand more and you’ll like it even more.

In your question you say you don’t understand, but what part ? the printing part or the assigning a value to a variable ? I’ll explain both anyways.

In swift when you want to apply a value to a variable you have to use the equal sign =.

So it should look something like this

var anyName = value

if you want to “print” or show the value that’s within the variable, in this case “value”, you use the method “println()”

println(anyName)  // it will print “value”

hope it helps a bit.