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

Drew Clements
Drew Clements
3,617 Points

Again, I have no idea what is wrong with this code. It looks right to me

As far as my little JS knowledge goes the code should log 4-156 to the console as requested.

script.js
for ( var i = 3; i <= 156; i + 1) {
  console.log( i );
}

1 Answer

victor cooper
victor cooper
6,436 Points

almost, you need to set the var i = 4 and not 3