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 have the right answer (I think) but it still says that its wrong.

Question: Given the constant named language, write a println statement which will print the following string: "Learning Swift".

Use the language constant within the string you pass to your println statement. Practice using string interpolation.

Answer: let language = "Swift" println ("Learning(language)")

Result: Bummer! You printed "Learning Swift", but you were supposed to print "Learning Swift".

In essence.. I have the answer right but treehouse just doesn't care? :/

1 Answer

Hey alexander Leavell,

You're VERY close. You're just missing one character. What you're looking to do is use string interpolation to add the value stored inside a constant or variable to another string. The syntax for this is \(variable).

let language = "Swift" 
println ("Learning \(language)")

I also recommend that you Switch to the iOS Swift 2.0 Development track. The Swift language is on version 2.0 now and there have been some changes. For example, println() is no longer supported. It has been changed to print(). So, if you're using println(), you will get an error.

The new track has accounted for these changes. You can find it here: Swift 2.0

Good Luck!