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 trialCaleb Kleveter
Treehouse Moderator 37,862 PointsHaving trouble with the 'String Manipulation' challenge.
I know Swift, so I must be doing something silly, because I keep getting this error: Bummer! Make sure the value of finalGreeting matches requirements specified in the question!
, what am I doing wrong? I think all I need is another set of eyes to find a simple bug. I need to concatenate greeting with " How are you?"
// Enter your code below
let name = "Caleb"
let greeting = "Hi there, \(name)."
let finalGreeting = greeting + " How are you?"
2 Answers
Richard Lu
20,185 PointsHey Caleb,
I saw this problem arise yesterday, and it seems that this part:
let finalGreeting = greeting + " How are you?"
has a bug. If you take out the space in " How are you?" at the beginning of the string the issue goes away.
Steve Hunter
57,712 PointsYep - that's it. The string doesn't want to start with a space. I'm sure that'll get fixed in time - it has been reported as an issue.
Steve.
Caleb Kleveter
Treehouse Moderator 37,862 PointsCaleb Kleveter
Treehouse Moderator 37,862 PointsThanks Richard.