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 Basics Swift Types Recap: Swift Types

Kristen Cordes
Kristen Cordes
807 Points

interpolation

I feel like I'm really close, but just can't quite get it. Please help

// Enter your code below let firstValue: Int = 12 let secondValue: Int = 10 let product = firstValue * secondValue let output = "The product of (firstValue), times (secondValue),is (product)"

types.swift
// Enter your code below
let firstValue: Int = 12
let secondValue: Int = 10
let product = firstValue * secondValue
let output = "The product of \(firstValue),
times \(secondValue),is \(product)"

1 Answer

If you are basing your code on this video @ 11:40 there are commas in the video because there are commas in the final string. In task 2 there are no commas. It should just be "The product of 12 times 10 is 120". You will also want to move this string to one line.

Kristen Cordes
Kristen Cordes
807 Points

Thank you!! After rewatching the videos a few times I did finally figure it out. Those darn commas were really messing me up. It is all about the syntax isn't it.?

Again....appreciate your help.