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 trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![codyl](https://uploads.teamtreehouse.com/production/profile-photos/10698514/micro_0019Alicia_Cody__3_.jpg)
codyl
4,704 PointsWorks in xcode - Maybe I'm not doing it the way they're asking?
I don't think the challenge is very clear. I'm pretty sure I'm doing it the way they're asking me to do it. Can someone suggest what might be off?
// Enter your code below
let name = "Cody"
let message = "Hi there"
let greeting = "\(message), \(name)"
let finalGreeting = "\(greeting). \("How are you?")"
2 Answers
![Jason Anders](https://uploads.teamtreehouse.com/production/profile-photos/3512822/micro_Jason_s-Pic.jpg)
Jason Anders
Treehouse Moderator 145,859 PointsHi Cody,
While the code is correct and will work, it is not what the instructions for the challenge are asking for.
For Task one, there should be only two variables. The name
and the greeting
one. the value of greeting
will use interpolation to output "Hi there, (name)". So, your message
variable wasn't asked for and needs to be deleted.
Now the second challenge explicitly asks for concatenation
to be used, but you are still using interpolation
. Once you fix those up, you're all good.
Remember, instructions for challenges are very specific and need to be followed exactly or you'll more than likely get the Bummer!
. Even if code is correct and works locally, if it's not exactly what is asked for, it won't work. Even something as small a missing period or a capital letter instead of a lower-cased one..." Very picky...
Nice work! :)
![Gundra Kiran](https://uploads.teamtreehouse.com/production/profile-photos/4974272/micro_FB_IMG_1451496144360.jpg)
Gundra Kiran
Courses Plus Student 5,931 PointsHi Cody,
You are code has no error but in the challenge, the editor is expecting an exact solution for which it has been programmed. For suppose above code challenge. The first task is of interpolation where the concept of using any variable in double quations "()"and the second concept is concatenation means adding two strings using + plus symbol. I am posting my solution take a look and rectify yours
let name = "Kiran"
let greeting = "Hi there, \(name)."
let finalGreeting = greeting + "How are you?"