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

I cannot for the life of me understand why my interpolated string isn't working? I need help, can anyone assist?

This is my code for interpolated strings quiz 1 of 2 in Swift Basics

let name = "Doug" let greeting = "Hi there,"

let response = "(greeting) (name)"

strings.swift
let name = "Doug"
let greeting = "Hi there,"

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

2 Answers

james south
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
james south
Front End Web Development Techdegree Graduate 33,271 Points

there is no instruction to create a variable called response. delete that line and put the interpolated string for your name after the Hi there in the greeting variable like it asks and it will pass.

Emanuele Gorga
Emanuele Gorga
5,020 Points

This is how I am doing it and I can't pass the challenge:

let name = "Emanuele" let greeting = "Hi there, "

let interpolatedGreetingName = "(greeting) (name)"

Obviously let greeting is below let name. Anyone can help me out?