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 trialShanti Oppenheimer
2,704 PointsThe test is wrong on one of the questions. See the screenshot here: https://screencast.com/t/iCQeAodDg
1 Answer
Martin Ring
Front End Web Development Techdegree Graduate 21,501 Pointsfor ( var i = 0; i < 10; i++) {
console.log(i)
} ```
This will run the code 10 times. Bear in mind the counter starts at 0. It will run from zero to nine, which are 10 times.
Kjetil-Lennart A. Lorentzen
13,390 PointsKjetil-Lennart A. Lorentzen
13,390 PointsNo, it counts from 0, so it does go 11 rounds, but the last output is 10.
so: 0 1 2 3 4 5 6 7 8 9 10 // 11
you want: 0 1 2 3 4 5 6 7 8 9 // 10