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 trialFlorin Puia
3,559 PointsBummer: Your code took too long to run. - > It's annoying!
Bummer: Your code took too long to run. - > It's annoying! It takes to much to load 4 lines of code...
var count = 1;
while (count <= 26){
document.write(document);
}
1 Answer
Steven Parker
231,248 PointsWithout the line that increments "counter", the code would be an "infinite loop" which explains the error message about taking too long.
But with that line added, I would expect it to work properly.
Do you still have any problem?
Florin Puia
3,559 PointsNo, it works perfectly. Thank you!
Florin Puia
3,559 PointsFlorin Puia
3,559 PointsIt's work with that, sorry for the post,I forgot to add counter = counter + 1
var count = 1; while (count <= 26){ document.write('Something'); count = count + 1; }