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

How do I complete Challenge Task 2 of 2 for Swift 3 Basics? The instructions are confusing to me? Thank you.

I feel like I'm doing the correct coding but the video examples don't seem to work with the task.

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

let finalGreeting = greeting

I do realize that the last constant is wrong, but I don't see how it should be according to the instructions.

1 Answer

The greeting constant should only contain "Hi there, (name)" It is asking you to add "How are you?" in the last constant by using the addition operator. So it goes like this:

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

let finalGreeting = greeting + " How are you?"

I see. Cool! Thank you.