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 trialLewis Mansbridge
1,119 PointsHi there, can anyone help me please, says the code is wrong, also it keeps crashing as in when i click work it freezes!
Hi there, can anyone help me please, says the code is wrong, also it keeps crashing as in when i click work it freezes and just says "working..." Thank you!!
// Enter your code below
let name = "Lewis"
let greeting = "Hi there, " + name + "."
3 Answers
luke jones
8,915 PointsWhat you're doing here is concatenation. What it's asking for is interpolation. Here's the answer:
let name = "Lewis"
let greeting = "Hi there, \(name)."
The answer you given and the answer I have given produce the same results. The only difference is the method in which its done.
Moderator edited: Added Markdown to code to show syntax highlighting and moved from Comment section to Answer.
Lewis Mansbridge
1,119 PointsThank you!
Lewis Mansbridge
1,119 PointsThank you!