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 trialKevin Sanchez
484 PointsString Interpolation
I don't know how to do this please help
// Enter your code below
Let interpolation name = Kevin
Let greeting = "Hi There\(name)"
Let greeting = "Hi There, Kevin"
1 Answer
Florin Veja
6,912 PointsKevin,
As Misha stated, let should be lowercase.
For this challenge, the first step is to create a constant called "name" and assign it your name. You have the word interpolation in there and you also need quotes around Kevin. Like this.
let name = "Kevin"
The second part of the challenge says to declare a constant named greeting and assign to it "Hi there, " ("Hi" with an uppercase H, "there" lowercase, comma, space), then use interpolation to add the name constant defined earlier.
let greeting = "Hi there, \(name)"
Let me know how that works for you.
Florin
Misha Holtz
4,655 PointsMisha Holtz
4,655 PointsHi,
I noticed that your "let" statements are capitalized.
Try lowercase "let". These keywords are case sensitive.