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 trialBrenna Leker
7,596 PointsI keep getting "Bummer! Your code took to long to run." Am i doing something wrong or is it Treehouse?
I am in the new course Javascript Loops, Arrays and Objects in "Simplify repetitive tasks with loops" on the second challenge. The first challenge went through with not issues but I keep getting this error on the second one. I've been using Treehouse for several months now and have never encountered this error before.
Any help would be greatly appreciated.
Thank you, Brenna
var count = 0;
while(count<26){
document.write (count);
count=+1;
}
1 Answer
David Tonge
Courses Plus Student 45,640 PointsYeah, your syntax is infinite loop.
var count = 0;
while(count < 26){
document.write (count);
// should be
count += 1;
}
Brenna Leker
7,596 PointsBrenna Leker
7,596 PointsThank you so much for the speedy reply, that solved my issue!
David Tonge
Courses Plus Student 45,640 PointsDavid Tonge
Courses Plus Student 45,640 PointsNo problem, Brenda. You could also type it this way too.