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 trialBrian Moore
8,277 PointsI don't understand how to assign an interpolated string to the constant greeting
let name = "Brian."
let greeting = "Hi there,"
let interpolatedGreeting = "(greeting) (name)"
// Enter your code below
let name = "Brian Moore"
let gretting =
2 Answers
Gareth Jones
2,095 PointsYou're missing the backslash, try this:
let interpolatedGreeting = "\(greeting) \(name)"
However, if I'm remembering correctly the task calls for you to create the greeting "Hi there, John" which can be done using the code below
let name = "John"
let greeting = "Hi there, \(name)"
by the way, more info available here
Brian Moore
8,277 PointsYes, thanks for your help!