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 trialRahul Nair
519 PointsI'm not understanding the error!
The error says that I must declare a constant named multiplier but I have already named constant multiplier. Please help me?!
// Enter your code below
var results: [Int] = []
3 Answers
Ben Masel
2,004 PointsI'm not completely sure if this is an answer but i think it means a for in loop constant, like: for multiplier in {(Random Code)} These are just clues so if you need more help at this just comment. Hope this helps!
Abderrahim Gdah
1,326 Pointslet multiplier : [Int]
Jennifer Nordell
Treehouse TeacherBenjamin Masel is correct. The constant they are referring to is the one to be set up in your for loop. Like so:
for multiplier in 1...10 {
// insert code here
}
edited for additional comment
When we set up a for loop you can think of this as a temporary variable/constant declaration. The reason this is "temporary" is that multiplier
will only exist during the execution of the loop. When the loop stops, it disappears. Hope this helps!