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 trialMark Langston
496 Pointsprintln problem
I am having trouble writing the code for interpolation. I can not seem to get the constant and the string together. help.
let language = string "Swift"
var greeting = \
1 Answer
Tobias Helmrich
31,603 PointsHey Mark,
firstly you shouldn't change the language constant, you can just leave it as it is. To print out "Learning Swift" with the println
function and string interpolation you can write the String "Learning " and then inside of the string you can interpolate the constant language
by writing it inside of \()
. Also just a note by the way: In Swift 2 you have to use the print
function instead of println
.
The solution for this challenge could look like this:
let language = "Swift"
println("Learning \(language)")
I hope that helps, good luck! :)