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 trialBrave Williams
171 PointsJust 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
iOS Development with Swift Techdegree Graduate 13,121 PointsHi 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.
Try:
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!
Brave Williams
171 PointsWouter,
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!
malcolm henry
1,089 Pointsmalcolm henry
1,089 PointsThis did work but my code worked in Xcode β I Just made a post about it