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 trialKepler Murat
122 Pointswhy is it wrong?
I checked it on xcode and it works...
// Enter your code below
let name = "Kepler"
let greeting = "Hi there"
let interpolatedGreeting = "\(greeting),\(name)"
4 Answers
Michael Hulet
47,913 PointsYour syntax here is valid, but it doesn't do what the challenge asks. The challenge asks you to have the full sentence, including your name interpolated into it, in the greeting
constant instead of creating a 3rd interpolatedGreeting
variable. Also, be sure to put a space after the comma (,
) in the sentence. After making those changes, your code passes the challenge for me
Kepler Murat
122 Pointshey man thanks for the help but it is still not letting me move on.
Michael Hulet
47,913 PointsWhat code did you try this time?
Kepler Murat
122 Pointslet name = "Kepler" let greeting = "Hi there" let interpolatedGreeting = "(greeting), (name)"
Michael Hulet
47,913 PointsAgain, you don't need to make a 3rd constant to pass the challenge. All you need is greeting
, not interpolatedGreeting
. Also, your syntax for interpolation was valid in the code you tried at first, but not in this one. Don't forget the backslashes (\
)! That being said, it's good you added a space after the comma (,
) in this one. That part is necessary to pass
Kepler Murat
122 Pointsyou know what... it's not working I am seriously stuck I cannot see what I am doing wrong.