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 trialPema Khando Shachentsang
Courses Plus Student 1,210 Pointsstring
let name = "Tenzin" let greeting = "Hi there," let anotherName = "Linda" let interpolated = name + "," + greeting +"," + anotherName // string Interpolation let interpolationName = "(greeting), (anotherName)"
but its not working please help me find a solution
2 Answers
Pema Khando Shachentsang
Courses Plus Student 1,210 Pointsnot working i used your solution let name = "Tenzin" let greeting = "Hi there" let anotherName = "Linda." let interpolationName = "(greeting), (anotherName)" please help me
Luke Morgan-Scott
4,815 PointsKyle's answer worked for me. Making sure to put the backward slash () in front of the variable names in parentheses should allow the strings to replace those variable names. Ex:
let interpolationName = "\(greeting), \(anotherName)"
Kyle Lambert
1,969 PointsKyle Lambert
1,969 Points