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

JavaScript JavaScript Loops, Arrays and Objects Simplify Repetitive Tasks with Loops Review while loops, do...while loops, and Loop Conditions

Having trouble with the fill in the blanks questions

a straight answer would be highly appreciated.

Matthew Lang
Matthew Lang
13,483 Points

Perhaps watch over the video again to get a better understanding. I also find using pen and paper to step through the process (loop, function, etc) helps a lot (I still do this and I've been programming for just over a year).

Good luck!

Ive watched the videos repeatedly

1 Answer

Steven Parker
Steven Parker
231,269 Points

The one with just one blank needs a number that will make the loop run 10 times. Things to look at to determine which number are:

  • what value does the loop start with?
  • what comparison operation is being used?
  • after running 10 times, what will the variable contain?

The multiple blank question might be easier to solve if you just write your own code to do the job following the genera structure shown, and then compare it to the code with the blanks to determine what each blank should contain.