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 trialLucas Peters
Courses Plus Student 1,003 PointsI don't get this one....
What is now wrong in here?
// Enter your code below
let name = "Lucas"
let greeting = "Hi there, \(name)"
let finalGreeting = "\(greeting) How are you?"
3 Answers
Hannah Gaskins
14,572 PointsHey there Lucas,
You are super close. The key is in the question description when it says "concatenate" think the + sign. And concatenate two separate strings. So you'll also want to close the (greeting) interpolation string and begin another. Check out this resource:
The final exercise will look like this:
let finalGreeting = "\(greeting)." + "How are you?"
Hope this helps!
Brandon Mahoney
iOS Development with Swift Techdegree Graduate 30,149 PointsSince greeting is constant that contains a string it does not need placed into a string or a backslash. Also notice the white space before 'How'.
let finalGreeting = (greeting) + " How are you?"
Taylor Amsler
4,427 PointsHey there. Super close, as that would work, but the challenge asks you to use string concatenation. So try something similar to:
let finalGreeting = "value1" + "value2"
Hope that is helpful.