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 trialvilla
6,171 PointsSecond, declare a constant named greeting. Set the value of greeting to an interpolated string that combines "Hi there,
Bummer! Make sure the value your are assigning to greeting is an interpolated string.
// Enter your code below
let name = "Juan"
let greeting = "Hi there"
let interpolatedString = "\(greeting), \(name)"
3 Answers
Lara DiLiberti
2,942 PointsHi Juan Luis, Just to add to the above comment, it still needs a backslash before (name), and a period.
SO: let name = "Juan" let greeting = "Hi there" let interpolatedString = "Hi there, (name)."
This is what was accepted, I also originally wrote it the way you did, and got the bummer message, although your code works in playground...
Christian Kroul
9,849 PointsHere you go
let name = "bob"
let greeting = "Hi there, \(name)"
Pablo Santos
231 PointsThis is the one that worked; there were several of them that didn't work throughout this website. Thanks for your help
villa
6,171 PointsThanks Lara and Christian