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
Mark Brady
6,239 Pointsdocument.write isn't being called..
In this challenge, you will create a while loop that prints to the document 26 times. We've added a variable named count, use it to track the number of times the loop runs. Don't forget to use the document.write() method inside the loop.
What's wrong with my code here?
var count = 0;
while (count > 26) {
document.write(count);
count += 1;
}
1 Answer
Michael Liendo
15,326 PointsYou're using a greater-than sign, so zero is never greater than 26. Simply use a less than sign and you're all set :)
Mark Brady
6,239 PointsSometimes is very difficult to see our own errors. haha I can't believe I missed that.
Thanks man!
Jesus Mendoza
23,289 PointsGet used to it because it will happen a lot!
Mark Brady
6,239 PointsMark Brady
6,239 PointsI've tried reversing the document.write and the count+= 1 but still no dice.