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

Daniel Lambrecht
seal-mask
PLUS
.a{fill-rule:evenodd;}techdegree
Daniel Lambrecht
iOS Development Techdegree Student 5,302 Points

i dont get whats wrong with my code

i think i did it right, but somewhere ive missed something...

what is it :D

strings.swift
let name = "Danny"
let finalGreeting = "how are you?"
let greeting = "hi there, \(name) + ". " + finalGreeting"

1 Answer

Luigi Santos
Luigi Santos
13,200 Points

Hey Daniel,

I think it's the syntax in the greeting constant, try removing the quotation marks before the period, as it is unnecessary. Give this a try:

let name = "Danny"
let finalGreeting = "How are you?"
let greeting = "Hi there, \(name). \(finalGreeting)"
Daniel Lambrecht
seal-mask
.a{fill-rule:evenodd;}techdegree
Daniel Lambrecht
iOS Development Techdegree Student 5,302 Points

Ive tried that, still doesnt work..

i get this error: Bummer! Make sure you're using concatenation to create the final string value required!