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

peterson st gourdain
peterson st gourdain
931 Points

im a little stuck

clarify for me pls

script.js
var count = 0;
while ( count<26 ) {
  document.write(count + "\n");
}
  count++;

1 Answer

Valeshan Naidoo
Valeshan Naidoo
27,004 Points

Very close, you need to insert the count++ inside the while loop.

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