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 trialbebasdhungana
505 Pointspls help so confused right know
Can anybody help this is super confusing to me
// Enter your code below
let name = "bebas"
let greeting = "Hi there \(name)."
let finalGreeting = "\(greeting), \(name) + "How are you?"
1 Answer
Nat Rogers
7,433 PointsYou are very close. You are just missing a period in the "greeting" and a space in the second string of "finalGreeting"
let name = "Nat"
let greeting = "Hi there, \(name)."
let finalGreeting = "\(greeting)" + " How are you?"
David Papandrew
8,386 PointsDavid Papandrew
8,386 PointsBebas, the 3rd constant, finalGreeting, has an improperly closed string.
You could do this, for instance: let finalGreeting = "(greeting), (name)" + "How are you?" [note the close quote after (name)]
Or, you could do this: let finalGreeting = "\greeting), (name) How are you?" [where you remove the leading quotation and plus symbol between (name) and How]