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 trialanalyn jane calado
3,523 Pointswhat code is missing???
i got stock here!
var count= 1;
while (26 ) {
document.write("<p>26" + count + "</p>");
count += 1;
}
1 Answer
rydavim
18,814 PointsRight now you've got an infinite loop, because while (26) will always evaluate to true. Additionally, you normally don't want to make alterations to challenge code unless they specifically ask you to.
var count = 0; // Leave this as 0, just in case!
while (count < 26) { // While the count is less than 26...
document.write("The count is: " + count); // Write something meaningful to the document so you can keep track of what's happening.
count++; // Increment the count by one. This is just a shorthand for this.
}
analyn jane calado
3,523 Pointsanalyn jane calado
3,523 Pointsthanks.. i did it!