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 trialMichael Friederang
Courses Plus Student 115 PointsThe answer is wrong
When i put in: println("Learing " + language), it says I am wrong
let language = "Swift"
6 Answers
William Li
Courses Plus Student 26,868 Pointsno, the answer is not wrong.
- your spelling of the word Learing is a typo
-
language should be
\(language)
, (this is called string interpolation) and should be placed inside the ""
println("Learning \(language)")
Michael Friederang
Courses Plus Student 115 Pointscan you explain it to me?
Chris Shaw
26,676 PointsThis challenge expects interpolation which is what's shown in William Li' answer as that is what was discussed earlier on in the course, what you attempted was concatenation which is also correct but not what the challenge is expecting.
William Li
Courses Plus Student 26,868 PointsI explained what you've done wrong in my answer, still feeling confused?
Michael Friederang
Courses Plus Student 115 Pointsyes
xcjhz ZBNCkuSF
Courses Plus Student 56 PointsNo No you doing it all wrong it just the spelling is wrong. You put learning swift.
Michael Friederang
Courses Plus Student 115 Pointsno i didn't
xcjhz ZBNCkuSF
Courses Plus Student 56 PointsWhat's println
xcjhz ZBNCkuSF
Courses Plus Student 56 PointsThat's a typo
William Li
Courses Plus Student 26,868 PointsWell, Krish, I don't argue that the output is the same. However, this question is asking
(Remember to use the language constant within the string you pass to your println statement).
Unless you do what the challenge is asking for, you don't get pass.
Michael Friederang
Courses Plus Student 115 Pointsbut william i did
Michael Friederang
Courses Plus Student 115 Pointsprint, prints it onto assistant editor println, does the same thing but the next print you do is on another line
Michael Friederang
Courses Plus Student 115 PointsMichael Friederang
Courses Plus Student 115 PointsI tried and tried