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 trialMarina Giulia Razza
1,444 PointsDoesn't work
In the challenge last 1 of 2 about string interpolation i wrote: let name = "Marina" let greeting = " ("Hi there, ") (name)" but the program says "Make sure the value you are assigning to greeting is an interpolated string", i can't understand why it doesn't work, on Xcode it works.
// Enter your code below
let name = "Marina"
let greeting = " \("Hi there, ") \(name)"
1 Answer
Jason Anders
Treehouse Moderator 145,860 PointsHey Marina,
For the greeting
variable, you have a couple of issues. First, there are an extra set of quotation marks. And, second, the string part ("Hi there") cannot be in parenthesis. Only the variable being interpolated should be surrounded by parenthesis. So, you're on the right track.
let greeting = "Hi there, \(name)"
Keep Coding! :)