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
Shannon Yeh
8,987 Pointshelp i dont get printing results challenge
The question asks: Given the constant named language, write a println statement which will print the following string: "Learning Swift". (Remember to use the language constant within the string you pass to your println statement).
so i got let language = "Swift" but do I have to do the parentheses thing with the backword slash?
3 Answers
Chris Shaw
26,676 PointsHi Shannon,
You do need to use interpolation for this challenge, if you remember back to the earlier Swift videos Amit talking about interpolation about. See the below example.
let myConstant = "Something"
println("The variable 'myConstant' is a constant and contains the value \(myConstant)")
Jesper Hakerod
21,751 PointsString interpolation like the one Chris Upjohn mentioned is good too use because it makes the text (the code) easy to read. Its even better if you choose good names for your constants. Keep struggeling! :D
Maitha Al Rumaithi
99 PointsGiven the constant named language, write a println statement which will print the following string: "Learning Swift". (Remember to use the language constant within the string you pass to your println statement). help how do i solve this question ?
Jesse Bray
9,664 PointsJesse Bray
9,664 Pointsin order to print you need to tell the computer to print. '''println()''' this tells the computer to "print" whats inside "()" For example ....'''println("Swift is Awesome")'''