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 2.0 Basics Swift Types String Manipulation

String manipulation Task 2 of 2

String manipulation Task 2 of 2 seems to be not working.

I've tried everything but the task won't accept it. What do I do wrong?

I've tried:

let name = "Gustav" let greeting = "Hi there, (name)." let finalGreeting = "(greeting) (" How are you?")"

and:

let name = "Gustav" let greeting = "Hi there, (name)." let finalGreeting = "(greeting) How are you?"

Both compile and give me the same result but the task keeps telling me Bummer!

1 Answer

Jeremy Faith
PLUS
Jeremy Faith
Courses Plus Student 56,696 Points

The second task ask you concatenate the greeting string with the string literal " How are you?"

Code should look like this:

let name = "Gustav" 
let greeting = "Hi there, \(name)." 
let finalGreeting = greeting + " How are you?"

Hope this helps.