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

José Manuel Martínez López
José Manuel Martínez López
18,133 Points

Help

I can´t find the error.

strings.swift
// Enter your code below
let name = "Jose Manuel"
let greeting = "Hi there, \(name)."
let finalGreeting = "\(greeting) How are you?"
Patrick Egan
Patrick Egan
3,634 Points

Hi there Jose. What error were you getting? I ask as your code is perfectly valid. I even tried it in a playground to make sure.

Caleb Kleveter
Caleb Kleveter
Treehouse Moderator 37,862 Points

Patrick Egan , you are right, the code is valid; the reason it wouldn't pass is because the challenge requires you to use concatenation for the finalGreeting constant.

1 Answer

José Manuel Martínez López
José Manuel Martínez López
18,133 Points

Nevermind, I figured out. let finalGreeting = greeting + " How are you?"

Caleb Kleveter
Caleb Kleveter
Treehouse Moderator 37,862 Points

José Manuel Martínez López , I thought I might let you know I changed your comment to an answer. This allows you to be up-voted, and awarded with best answer! I marked it best, if you ever have any you answer to yourself like you just did, you should mark it also.