xxxxxxxxxx
21
function setup() {
createCanvas(400, 400);
}
function draw() {
background(0);
var x=0
//I had to add = after x< to make the circles go all the way to the end
while (x<=width){
fill(0,200,255);
ellipse(x,100,25,25);
x=x+50
}
// x=x+50 can be written as x+=50 and x=x+1 can be written as x++
// for and while are similar, but for can be written all in 1 line
for (var x=0; x<=width; x+=50){
fill(255,0,200);
ellipse(x,300,25,25);
}
}