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 trialwalter fernandez
4,992 PointsInside the body of the loop, we're going to use the multiplier to get the multiple of 6. For example, if the multiplier
help
// Enter your code below
var results: [Int] = ["\(multiplier) time 6 is iqual to \(multiplier * 6)]
for multiplier in 1...10 {
results.append(multiplier * 6)
}
1 Answer
Elena Willen
Courses Plus Student 3,268 PointsHey Walter,
Your error here comes from the fact that your variable called results
is of type [Int]
but then you assign a value of type [String]
.
I suggest you keep this variable empty and this should work.
Let me know if it's still unclear.