iOS Swift Basics Swift Types String Manipulation

Christopher J Doyle
Christopher J Doyle
682 Points

Trying to figure out what I am doing wrong

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

what am i doing wrong?

strings.swift
// Enter your code below

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

2 Answers

Jeff McDivitt
Jeff McDivitt
23,960 Points

Hello - You almost have it, it is just on the last part where you have the name. Since this is already in your greeting variable you do not need to include it

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