iOS Swift Basics Swift Types String Manipulation

3,369 Points

how is this wrong?

i don't understand how this code is wrong

// Enter your code below
let name = "christian"
let finalGreeting = "How are you?"

let greeting = "Hi there, \(name). \(finalGreeting)"

1 Answer

Rickey Paape
Rickey Paape
24,091 Points

You should declare your name. Declare the greeting then using concatenation, create the finalGreeting.

let name = "name"
let greeting = "Hi there, \(name)"
let finalGreeting = greeting+". How are you?"