1. Home
  2. Javascript
  3. While
#javascript#loop#array

Execute the code inside the loop as long as the statement is true.

var width = 1;
var limit = 200;

while (width <= limit){
    console.log(width);
    width++;
}
copy
Full Javascript cheatsheet
Sitemap Git repository