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!
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
Lewis Mansbridge1,119 Points
Hi 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 + "."
luke jones8,915 Points
What 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.