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 Basics (retired) Types Printing Results

Adam Stempel
Adam Stempel
102 Points

why is this incorrect?

you should include the ability to show the answer or create a walk through of the correct answer with the option for a second challenge. this would not only help the user understand how/why the syntax is correct but also cut down on these questions.

println.swift
let language : String = "Swift"

println("Learning \ (language)")

2 Answers

Ricardo Gonzalez
Ricardo Gonzalez
2,286 Points

Well you don't have to specify that the code is a string. So instead of (let language: String = "Swift") it would just be (let language = "Swift").Besides that everything seems to be good.

Adam Stempel
Adam Stempel
102 Points

Hi Ricardo, Thanks for the reply. I am now using the following: let language = "Swift" println("Learning \ (language)") and still not passing. I get the following the message: Bummer! You need to interpolate the value of the 'language' constant into the string you pass to 'println'.

Ricardo Gonzalez
Ricardo Gonzalez
2,286 Points
//This is what your code should look like.

let language = "Swift"
println("Learning \(language)")
Ricardo Gonzalez
Ricardo Gonzalez
2,286 Points

Take in mind that Swift is case sensitive which means that even the slightest mistake can cause an error in your code. For example if you upper case a letter which actually should be lower case then it would be mark as an error. What i mean by this is that when you write the keyword "var" but you upper case all of the letters like this "VAR" or even just one letter "Var" then it would be mark as an error. Another example would be like a extra space or mispelling a word etc.