iOS Swift Basics Swift Types String Manipulation

Thomas Dullard
Thomas Dullard
1,217 Points

Hi, I'm new to task challenges. My Xcode seems to be fine, but I keep getting the following bummer message.

strings.swift
// Enter your code below
let name = "Thomas"
let greeting = "Hi there,"
let interpolatedGreeting = "\(greeting) \(name)"
Thomas Dullard
Thomas Dullard
1,217 Points

Bummer: Make sure the value you are assigning to greeting is an interpolated string

3 Answers

Victor Mercier
MOD
Victor Mercier
Treehouse Moderator 14,635 Points

Here is my code :

  let name = "Victor Mercier"
//greeting declaration using interpolation
let greeting = "Hi there, \(name)"
//finalGreeting declaration using concatenation
let finalGreeting = greeting + "How are you?"
Victor Mercier
MOD
Victor Mercier
Treehouse Moderator 14,635 Points

Just make sure you name the interpolatedGreeting finalGreeting!

Thomas Dullard
Thomas Dullard
1,217 Points

Still no luck Victor Mercier .... Any other workarounds?

let name = "Thomas."
let greeting = "Hi there,"
let finalGreeting = "\(name) \(greeting)"
Thomas Dullard
Thomas Dullard
1,217 Points

Thanks Victor Mercier.

Very much appreciated! I'm sorry if that was the most basic question you have ever had to answer, but it was very much appreciated!