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 trialMalthe Pedersen
2,338 PointsSwift 2.0 string manipulation
What am I doing wrong?
// Enter your code below
let name = "Malthe"
let greeting = "Hi there, \(name)."
let finalGreeting = "\(greeting) How are you?"
2 Answers
Chris Shaw
26,676 PointsHi Malthe,
Unlike the first part of the challenge which asks you to create an interpolated string, the second part asks that you concatenate greeting
with finalGreeting
which is achieved by using the plus +
operator as shown below.
let finalGreeting = greeting + " How are you?"
Happy coding!
Shreyas Sreenivasa
7,804 PointsNothing seems to be wrong in your code. It worked in Xcode.
Adam Blomberg
700 PointsYeah that's the tricky part, the code works in Xcode but it's not how you're instructed to perform the task. I had problem with this task as well, just be sure to read the instructions evenly.