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 trialDaniel Smithson
1,076 PointsNothing i try is working in the online compiler... I have done it exactly like the tutorial.
It isn't working even though i used the exact method from the video... I have tried different itteratios as well. The greet constant had to modified to get the compiler to work too... what going on?
// Enter your code below
let name = "Danni"
let greeting = "Hi there \(name)"
let finalGreeting = "\(greeting), How are you?"
2 Answers
Jennifer Nordell
Treehouse TeacherThe devil is in the details... or so they say. But this may be especially true of coding challenges. The challenge explicitly asks you to use concatenation, which is something that was covered earlier, I believe. Not very long ago at all I posted a solution together with a brief explanation of the difference between concatenation and interpolation. Take a look here:
Hope this helps!
agreatdaytocode
24,757 PointsDaniel Smithson,
" + " = Concatenation
" () " = interpolation
let name = "Danni"
let greeting = "Hi there \(name)"
let finalGreeting = greeting + "How are you?"