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 trialJacob Trevino
976 Pointsdo know what I'm doing worng
I'm to make a while code that counts to 26
var count = 0;
while ( counter < 26 ) {
var count
document.write( 'count ');
count += 1:
1 Answer
Mckenzie Hessel
Full Stack JavaScript Techdegree Graduate 20,437 Points- Your variable is named "count" but you wrote "counter" in the while loop.
- You don't need to repeat "var count" inside the loop.
- You didn't put the closing brace ( } ) on the end
- Inside document.write(), count should not be in quotation marks (if it is the computer will think you want to print the string "count")
- You have a colon after your last line of code
It should look like this:
var count = 0; while ( count < 26 ) { document.write(count) count += 1 }