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

Ryan Anderson
Ryan Anderson
630 Points

Are they looking for one specific answer?

When in Swift 2.0 Basics doing the first challenge, it asks me to make an interpolated string. When I write: let interpolatedGreeting = "Hi there, " + (name) + "." in Xcode, it registers as "Hi there, Ryan." which is what the example is showing... yet every way I change it to print that, it tells me I am wrong...

Any help would be appreciated!

strings.swift
// Enter your code below
let name = "Ryan"
let interpolatedGreeting = "Hi there, " + (name) + "."

1 Answer

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,441 Points

Two items to fix. The result should be assigned to greeting and the string needs to use the interpolated string:

// Enter your code below
let name = "Ryan"
let greeting = "Hi there, \(name)."