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 trialTejas Pulavarti
Courses Plus Student 654 PointsWhy does the error keep popping up even if I have the right string?
Is there any better way to structure this code?
// Enter your code below
let name = "TJ."
let nameNumberTwo = "Hi there,"
let finalGreeting = nameNumberTwo + name + "How are you?"
let greeting = "\(nameNumberTwo), \(name)"
2 Answers
jon kelson
5,149 PointsHi Tejas your code worked fine in playground. but if your getting errors in the task it might be because its a bit sensitive.
the challenge that I found was to get this for the finalGreeting task2. hope this helps.
let name = "Linda"
let greeting = "Hi there, \(name)"
let finalGreeting = greeting + " How are you?"
Tejas Pulavarti
Courses Plus Student 654 Pointsthank you