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

Barry Simons
Barry Simons
123 Points

Missing a step in completing an interpolated string. Not sure why I'm getting error. Thanks

A bit discouraged since so early doing constant strings. I can't get pass completing an interpolated string. I did a backward slash with double quotes. Just not sure where I'm going wrong and watched the video five times and still missing something.

strings.swift
// Enter your code below
let name = "barry simons"
let greeting = "hi there"
let NameGreeting = "\(name), \(greeting)"

2 Answers

Arman Arutyunov
Arman Arutyunov
21,900 Points

In the task you should interpolate the name constant into the greeting constant. And in the second task you should concatenate this greeting constant with How are you question. Like this:

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

// Second task
let finalGreeting = greeting + " How are you?"