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

Hello I am having trouble compiling an interpolated string in the code challenge

strings.swift
// Enter your code below
let name = "Garrett"
let greeting = "Hi there"
let interpolatedGreeting = "\(greeting) \(name)"

2 Answers

Hi there,

The constant greeting is made up of the string "Hi there, " and then your name interpolated into it.

Let me know how you get on.

Steve.

Hey Steve, thanks for responding to my post. I'm currently still having trouble with this challenge.. When experimenting with this code in the console it shows that it is right, however incorrect when typed in the code challenge. Could you show me an example of how it should look? Thanks for your help, Garrett.

Elena Iliasova
seal-mask
.a{fill-rule:evenodd;}techdegree
Elena Iliasova
iOS Development with Swift Techdegree Student 1,739 Points

I have the same problem. and I don' t understand what wrong. let name = "Alena" let greeting = "Hi there" let interpolatedGreeting = "(greeting), (name)" MyPlayground writing in right console show me that I writing a correct code "Hi there, Alena"