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 trialMegan Cross
2,045 PointsI have tried this three different ways and it won't pass what's wrong
complete the loop
var counter = 1;
while ( <= 10) {
document.write("<p>Now in loop #" + counter + "</p>");
counter += 1;
}
1 Answer
Steven Parker
231,248 PointsYou're on the right track, but "<= 10
" is not a complete comparison. You still need a term on the left side to compare with.
It looks like the code is set up to initialize and increment a variable named "counter" that might be useful.
Megan Cross
2,045 PointsMegan Cross
2,045 Pointsstill don't get it
Steven Parker
231,248 PointsSteven Parker
231,248 PointsWhat I was suggesting: