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 trial

iOS Swift Basics Swift Types String Manipulation

Nathan Ming
Nathan Ming
1,723 Points

I'm stuck again...

I'm not sure what I am suppose to do here. I see what the example is suppose to look like, but I'm not sure how I can find the right answer to this program..

strings.swift
// Enter your code below
let name = "Nathan"
let greeting = "Hi there, \(name)"
let finalGreeting = "greeting + \(name) + \(How are you?)

1 Answer

Hi

It looks like your almost there. The challenge asks for you to concatenate the value of the constant greeting to the string of 'How are you'

so it would be something like:

let finalGreeting = "\(your constant) How are you?"

because you have already captured the name in the greeting constant there is no need to add the (name) to the concatenation.

Hope that helps

Nathan Ming
Nathan Ming
1,723 Points

Thank you so much Marc... I'm slowly getting the hang of this... You guys are awesome :)

Nathan Ming
Nathan Ming
1,723 Points

Thank you again Marc. Excellent as always :)