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 trialaren polat
883 Pointsi am stuck in this question
I think i understood the question wrong but im stuck
// Enter your code below
let name = "aren"
let greeting = "\(hiThere,), \(name)"
6 Answers
Patrik Horváth
11,110 Points// Enter your code below
let name = "name"
let greeting = "Hi there, \(name)"
Callum Lynch
5,972 PointsI can see that there is abit of confusion in the answering of your question so i'd like to offer my help. I have written out the correct code below and will give it a bit of explanation now.
You have done the code 95% correct but its just the greeting constant that has the error. Only the name should be in brackets. As the greeting constant is a string, you simply write it like a normal string e.g. "Hi There". Then to pull the name constant into the string, you add (name) before you close the string... this would then read as "Hi there, (name)".
''' let name = "Callum" let greeting = "Hi there, (name)" '''
Hirenkumar Patel
Courses Plus Student 9,464 PointsSecond statement should be like this, let greeting = " hi There, (name)"
Patrik Horváth
11,110 Points\(name) not (name)
Hirenkumar Patel
Courses Plus Student 9,464 PointsYes
Patrik Horváth
11,110 Pointswhy you post "Yes" as answere ?
Hirenkumar Patel
Courses Plus Student 9,464 PointsI mean put (name)
Hirenkumar Patel
Courses Plus Student 9,464 PointsWhen I try to print backward slash it don't show in my answer. My answer is backward slash and (name) in string.
Patrik Horváth
11,110 Pointsuse forum CODES its little bit up when you POSTING comment =)