xxxxxxxxxx
32
var x;
function setup() {
createCanvas(600, 200);
fill(255,183,173);
noStroke();
x = 0;
}
function draw() {
background(240);
var x = 0;
while(x <= 600){//as long as x is less than 600 it'll keep looping
ellipse(x,100,20,20);
x += 50; //shorthand way of doing this; every time it loops it'll loop by 50
}
//OR:
//for(var x = 0; x <= 600; x += 50)){
//ellipse(x,100,20,20);
//ellipse(x,100,20,20);
// x = x + 50;
}