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 trialsadik salad
1,916 Pointsconstant errorr
the question was 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). and i wrote it like this println ("Learning Swift"+language)
4 Answers
sadik salad
1,916 Pointsthanks :)
petri foxx
336 Pointswhy this statement not work for me ?
println("Learning " + language)
Yonesh Suwal
764 Pointsprintln("Learning (language)") worked but the other one didnt work.
Chris Atlas
2,038 PointsI believe it has to do with printing a value (+) or printing a line (println)
Robert Bojor
Courses Plus Student 29,439 PointsRobert Bojor
Courses Plus Student 29,439 PointsYou could also use println while escaping the variable inside the double quotes.
println("Learning \(language)")