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.

iOS Swift Basics Swift Types String Manipulation

Brave Williams
Brave Williams
171 Points

Just like example but interpolated string does not work.

Put code in as show but does not accept. Preview does not work. Possible to skip this challenge if there is an error? New to this platform so confused why you can’t see a list of comments under a challenge like other platforms; really useful.

Thank you!

// Enter your code below
let name = "Brave"
let greeting = "Hi there"
let finalGreeting = "\(greeting), \(name)"

2 Answers

Wouter Willebrands
.a{fill-rule:evenodd;}techdegree seal-36
Wouter Willebrands
iOS Development with Swift Techdegree Graduate 13,121 Points

Hi Brave,

If you a referring to the first part of the challenge you are actually creating an extra constant for the completed message. The compiler is a bit picky when it comes to answers.


let name = "Name"

let greeting = "Hi there, \ (name)"

If you are referring to the second part of the challenge I think you forgot to add the "How are you?" part as part of the concatenation for the finalGreeting constant.

I hope that allows you to continue.

Happy coding!

This did work but my code worked in Xcode — I Just made a post about it

Brave Williams
Brave Williams
171 Points


I really appreciate you taking a few moments to help me out. I was referring to the first part and your solution worked for the compiler.

I had interpolated both the greeting and the name; though it was similar to the video and it worked in Playgrounds it did not work in the compiler.

Thanks a ton!