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 trialNils Garland
18,416 PointsWhat am i doing doing wrong?
i dont know what i am doing wrong???
let name = "Leon"
let greeting = "Hi there, \(name)."
let finalGreeting = greeting + "How are you?"
let interpolatedGreeting = "\(greeting) \(name) \(finalGreeting)"
1 Answer
Jennifer Nordell
Treehouse TeacherYou're not. If I copy/paste your code into the challenge it passes both steps! Try clearing your browser cache and reloading the challenge then copy/paste your code from here. If that doesn't fix it, you may need to contact Treehouse support.
But while your code passes, it's not exactly what they're looking for either. Your interpolated greeting will end up looking like this: "Hi there, Leon. Leon How are you?". You have already put name in the greeting so you don't need it in the end interpolatedGreeting.
And the challenge you're linking to doesn't ask for an interpolatedGreeting variable.