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
larry blandCourses Plus Student 7,846 Points
am i reading the question too closely based on my coding?
i need more clarity on how i should set this on up in the editor
// Enter your code below let name = "Larry" let greeting = "Hi there" greeting = "\(greeting) ,+, \(,name)"
When using string interpolation you don't need to use + or commas, you just type a string like you normally would and then insert the contents of variables by wrapping the variable name in \().
To get the string you are trying to produce you would just type it like this:
However that is not the only issue with your code, greeting is a constant. A constant is a variable which cannot have it's value reassigned. Which means that you can't set it to a different value after declaring it like you do in your code.
The solution is to use string interpolation on the string you initially assign to the greeting constant, like this:
let name = "Larry" let greeting = "Hi there, \(name)"