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 trialdonnie scantz
419 Pointsstring interpolations still killing me.
so i got past the last one, and now this...
let firstValue = 10
let secondValue = 8
let product = firstValue * secondValue
let output =
1 Answer
Jennifer Nordell
Treehouse Teacherdonnie scantz I know you can do string interpolation. And I know this, because I've seen you do it in other posts! I think you're overthinking this.
Interpolation: We use a backslash and parentheses to tell Swift something along the lines of "Hey! Put the value of this variable right here. Thanks."
Concatenation: We take two strings and join them together with a plain old plus sign.
So this is the line you're missing:
let output = "The product of \(firstValue) times \(secondValue) is \(product)"
Hang in there! You're doing better than you think you are
donnie scantz
419 Pointsdonnie scantz
419 Pointsthank you for your help and encouragement! I see i am making my understanding harder than it needs to be. thanks again Jennifer!
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse Teacherdonnie scantz You're quite welcome
Keenan Turner
6,270 PointsKeenan Turner
6,270 PointsLove your encouragement!
And Donnie you got this!
Steven Deutsch
21,046 PointsSteven Deutsch
21,046 PointsSo inspirational Jennifer