Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Rayhan Miah2,369 Points
Whats wrong with this code
let name = "Rayhan" let greeting = "Hi there," let interpolatedGreeting = "(greeting) (name)"
whats wrong with it
// Enter your code below let name = "Rayhan" let greeting = "Hi there," let interpolatedGreeting = "\(greeting) \(name)"
Greg Kaleka39,019 Points
You're coding correctly, but you should re-read the instructions .
The first task asks you to
Set the value of greeting to an interpolated string that combines "Hi there, " with the string stored in the name constant.
So in your case, you need to interpolate your name right in the
greeting string so that
greeting stores "Hi there, Rayhan."
Given the code you've written, I'm sure you know how to do this!
Ben Masel2,004 Points
Hi there Rayhan! All you forgot to do was concatenate interpolatedGreeting so interpolatedGreeting should really look like this:
let interpolatedGreeting = "(greeting)." + "How are you?"
hope this helps!