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

JavaScript JavaScript Loops, Arrays and Objects Simplify Repetitive Tasks with Loops Create a for Loop

2 Answers

Umesh Ravji
Umesh Ravji
42,386 Points

Hi Josias, you have a few minor problems that you need to fix :)

  1. You have no need for the counter variable. The value of i will be incremented each iteration, and that is what will need to be provided to the console.log() method.

  2. Inside the for loop, a semi-colon is used to separate the parts, not a comma.

  3. The ending condition also needs to be modified. Using i < 156 means that it will run when i is 155, but it won't run when i is 156 (which is a requirement of this challenge).