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 trial

iOS Swift 2.0 Basics Swift Types Recap: Swift Types

string interpolations still killing me.

so i got past the last one, and now this...

types.swift
let firstValue = 10
let secondValue = 8
let product = firstValue * secondValue
let output = 

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

donnie 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 :smiley:

thank you for your help and encouragement! I see i am making my understanding harder than it needs to be. thanks again Jennifer!

Keenan Turner
Keenan Turner
6,270 Points

Love your encouragement!

And Donnie you got this!