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

How do use document.write inside while loop

I set everything but still not understanding this quiz

var count = 0;
while (count <= 26 ){
  document.write("number" + count );


1 Answer

Hi Abdullahi,

try this one

var count = 0;

while(count < 26){

You pass the counter variable into the document.write method. Every time the loops runs the count variable increases by 1.