xxxxxxxxxx
30
function setup() {
createCanvas(600, 400);
}
function draw() {
background(0);
strokeWeight(4);
stroke(255);
let x = 0;
let r = 0, g = 0, b = 0;
//standard while loop
while (x <= width) {
fill(0, 200, 255);
circle(x, 100, 25);
x += 50;
}
//for loop
for(x = 0; x <= width; x += 50) {
fill(255, 0, 200);
circle(x, 300, 25);
}
}