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

Majed Alshammarii
Majed Alshammarii
1,174 Points

why there in no key answers?

Is there key answers?

strings.swift
// Enter your code below
let name = "Linda"
let greeting = "Hi there,"

let "\(name) \(greeting)"

2 Answers

Greg Kaleka
Greg Kaleka
39,021 Points

Hi Majed,

You're just missing a couple of key points:

First, you need to assign the string you're creating to a constant - it should look very similar to the two constant definitions you've already written. The challenge wants you to assign the string to a constant named fullGreeting.

Second you've swapped the order :smile:. Your string would say "LindaHi there,"

I think you can take it from here! Let us know if you still have trouble.

Majed Alshammarii
Majed Alshammarii
1,174 Points
let greeting = "Hi there"
let name = "Linda"

let fullgreeting = "\(name) \(greeting)"

// it works, thankYou