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 trialAlbert Karabaza
284 PointsCannot figure out the correct string interpolation in this challenge.
Changed the code numerous times. Initially the code was [let language = "Swift"] I changed it to [let language: String = "Swift"] Then I added println("Learning \ (language)") but it does not work. I have tried using the plus symbol nd leaving the first line alone but with no results.
let language: String = "Swift"
println("Learning \ (language)")
1 Answer
Bradley Jackson
2,668 PointsYou actually did this quite well! However, you just made a minor error with your syntax.
Here, your code follows as:
let language: String = "Swift"
println("Learning \ (language)")
NOW ONTO THE GUIDANCE TO THE ANSWER
You're trying to call a variable into a string, but what you did is \ (variable_name) instead of (variable_name) Hopefully this answer is good enough to get you on your feet and going again!
Happy Coding.
Albert Karabaza
284 PointsAlbert Karabaza
284 PointsThanks for the help. The module was jumping around a bit and the challenge was a bit of a trick in disguise. Onto the next module!
Bradley Jackson
2,668 PointsBradley Jackson
2,668 PointsGood to hear! :D