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 trialshamir allen
iOS Development Techdegree Student 98 Pointsconfuse
need to show answer after a million try
// Enter your code below
let name = "shamir"
let greeting = "\(hi there)"
2 Answers
jc laurent
6,351 PointsHi,
You didn't interpolate the first constant into the second. the result should be "Hi there + Shamir or whatever name you will have write in the first string.
Will Matthews
8,127 PointsHey Shamir,
When using interpolation, you want to insert the constant or variable into the string, using the constant's label in the brackets, not the string.
So if the goal is "Hi there, Shamir" then you'll what to assign the following to greeting instead...
let greeting = "Hi there, \(name)"
Hope that helps!
Dhanish Gajjar
20,185 PointsDhanish Gajjar
20,185 Pointsshamir allen check out my answer here on a similar post. https://teamtreehouse.com/community/let-name-payton-let-greeting-hi-there-name-where-did-i-go-wrong