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 trialGary Gibson
5,011 PointsAll the online searches tell me this for loop is correct, but quiz says I'm wrong.
for ( var i = 4; i <= 156; i += 1; ) { console.log(i); }
for ( var i = 4; i <= 156; i += 1; ) {
console.log(i);
}
3 Answers
Jacob Bergdahl
29,119 PointsRemove the semicolon from the for-loop and it will work. Your code should look something like this:
for (var i = 4; i <= 156; i += 1) {
console.log(i);
}
Justin Kraft
26,327 PointsTry removing the semi-colon after the iterator (i += 1)
Gary Gibson
5,011 PointsWorked. Thanks. Completely missed that!