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 trialHadassah Davis
1,478 PointsI don't know what I'm doing wrong
I tried a bunch of things and I even looked what I did on Xcode but I can't seem to get the answer right. Please help!
// Enter your code below
let name = "Hadassah"
let greeting = "Hi there"
let interpolatedgreeting = "\(greeting), \(name)"
3 Answers
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsYour code is valid Swift, it just doens't comply with what the Treehouse challenge is looking for.
They want the variable greeting
to be built using interpolation, rather than doing it in another step afterwards:
let greeting = "Hi there, \(name)"
Hadassah Davis
1,478 PointsThanks! That worked! Now I can't figure out what I did wrong here...
let name = "Hadassah" let greeting = "Hi There, (name)" let finalGreeting = "(greeting). How are you?"
Hadassah Davis
1,478 PointsNever mind I got it!