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 trialhalimat yusuf
2,290 PointsPlease practice using string interpolation to use the value of the 'language' constant in the string that is passed to
help please
let language = "Swift"
1 Answer
Tobias Helmrich
31,603 PointsHey there,
when you're printing out a string you can interpolate variables and constants in it by writing them into \()
. So now you have to print out "Learning Swift" but to print out Swift in the string you should use the existing constant language. To do that you have to interpolate the language constant in the string.
You do this like so:
let language = "Swift"
println("Learning \(language)")
I hope that helps and that you understand it, if not or if you have further questions feel free to ask! :) Good luck!
halimat yusuf
2,290 Pointshalimat yusuf
2,290 Pointsi got it thanks you