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
Steven Matthews186 Points
I am stuck on the first interpolation question, my answer states:
let name = "Steve Matthews"
let greeting = "Hi there, " + name
// Enter your code below let name = "Steve Matthews" let greeting = "Hi there, " + name
Eli FloresiOS Development Techdegree Student 3,851 Points
// LETS DO SOME SAMPLE: let name = "Jhon Doe"
let greeting = "Hi there, " + name // heavily uses the plus sign => " + "
STRING INTERPOLATION: let greeting = "Hi there, (name)" // Uses " ONE SET OF DOUBLE QUOTATION!", No need for the plus sign, "+" // but uses a special syntax ==> () <== // store the given properties either let or var between the parenthesis => (name)
Paul Karim3,428 Points
Hey Steven, so what you're doing is actually called String concatenation. The challenge requires string interpolation.
So you would do something like this
let name = "Paul Karim" let greeting = "Hi there, (name)."
In front of (name) you need a backslash :) but that's it.