Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Swift Basics Swift Types String Manipulation

Randell Purington
Randell Purington
9,992 Points

I am stuck on this one. I am not sure what I am missing.

I thought I had it right from following the video. But it says it isn't correct.

strings.swift
// Enter your code below

let greeting = "Hi there"
let name = "Linda"

let interpolatedGreeting = "\(greeting), \(name)" 

2 Answers

Magnus Hållberg
Magnus Hållberg
17,232 Points

The challlenge say you should interpolate the ”namn” constant in to the greering constant, not that you should create a new constant for them both.

Randell Purington
Randell Purington
9,992 Points

Thank you for the response. I am still having an issue with this one. I am not sure where I am messing up. I wrote it in Xcode and everything workes fine, but when I write it in the code challenge it isn't accepting my answer.

Magnus Hållberg
Magnus Hållberg
17,232 Points

Your syntax is not wrong, you hav just not done what the challenge say and that makes an error in the Treehouse ”playground”. It will give an error If you make a typo in a variable name even though the syntax is correct. So its important that you follow the instructions to the point.