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 Interpolation

I don't know how to do this please help

strings.swift
// Enter your code below
Let interpolation name = Kevin  
Let greeting = "Hi There\(name)"
Let greeting = "Hi There, Kevin"
Misha Holtz
Misha Holtz
4,655 Points

Hi,

I noticed that your "let" statements are capitalized.

Try lowercase "let". These keywords are case sensitive.

1 Answer

Kevin,

As Misha stated, let should be lowercase.

For this challenge, the first step is to create a constant called "name" and assign it your name. You have the word interpolation in there and you also need quotes around Kevin. Like this.

let name = "Kevin"

The second part of the challenge says to declare a constant named greeting and assign to it "Hi there, " ("Hi" with an uppercase H, "there" lowercase, comma, space), then use interpolation to add the name constant defined earlier.

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

Let me know how that works for you.

Florin