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 trialabdulmohsen abdullah
Courses Plus Student 352 Pointsi am having a problem with the interpolation question on swift ,i dont know what is going on
Help me please i want the answer to appear like (hi, there john) here is my code i'm trying to use interpolation let name = "john"
let greeting = "hi, there (name)"
10 Answers
Jeff McDivitt
23,970 PointsYou almost have it, you forgot the backslash in front of name.
let name = "Jeff"
let greeting = "Hi there \(name)"
Jeff McDivitt
23,970 PointsYou still don't have the back slash in front of your variable see my example
abdulmohsen abdullah
Courses Plus Student 352 PointsI'm sorry I didn't write the comment correctly what I actively wrote is this
let name = "john"
let greeting = "hi there (name)"
abdulmohsen abdullah
Courses Plus Student 352 PointsI try to write the backslash but it doesn't appear I don't know why
Jeff McDivitt
23,970 PointsI am not sure why you cannot have a back slash there but you will need it to pass the challenge
abdulmohsen abdullah
Courses Plus Student 352 Pointswhat am I suppose to do
Jeff McDivitt
23,970 PointsCopy and paste what I sent you
Shariff Matola
2,764 PointsHi guys I'm stuck here its not working please help let name = "sherry" let greeting = "Hi there (name)"
Jeff McDivitt
23,970 PointsHi Shariff - In your code you still do not have a back slash in front of your name variable which is using string interpolation
let name = "Jeff"
let greeting = "Hi there \(name)"
Shariff Matola
2,764 PointsGuys its not working help please
let name = "Sherry" let greeting = "Hi, there(name)"
Shariff Matola
2,764 Points//this ain't working guys. but on linux swift its working help me guys I'm kinda stuck
let name = "sherry" let greeting = "Hi there (name)"
//Even this not working
let name = "sherry" let greeting = "Hi there " let interpolatedGreeting = "Hi there (name)"
Veronica Segal
1,732 PointsIs not working for me too. Im the video it doesn't have this kind of sting. Help!!!
michaelm8
606 PointsHi there, I was having the same problem. make sure you don't forget the comma after hi there
jamiequakenbush
171 PointsWhy am i not allowed to put how are you?
Jackson Curro
375 Pointsim having the same problem , did you solve this
abdulmohsen abdullah
Courses Plus Student 352 Pointsabdulmohsen abdullah
Courses Plus Student 352 Pointsi tried but it says (make sure you are assigning the correct string to the variable) this is what i wrote
let name = "john"
let greeting = "hi there (name)"