JavaScript JavaScript Loops, Arrays and Objects Simplify Repetitive Tasks with Loops Create a while Loop

Gedeon Bashimbe
Gedeon Bashimbe
1,009 Points

Can someone look over my code.

Not sure what to put in the document.write method.

script.js
var count = 0
while (count < 27 ) {
      document.write();
       }

4 Answers

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 46,226 Points

Just add a line

count++

after document.write()

You will have one other tiny fix but it will be obvious from the error message

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 46,226 Points

You can leave the document.write() empty like you have it. But you will need to increment count inside your loop.

Gedeon Bashimbe
Gedeon Bashimbe
1,009 Points

How do I do that? and is the way I have it set up correct?