xxxxxxxxxx
18
//for loop
function setup() {
createCanvas(500, 500);
}
function draw() {
background(250);
let w = width / 20;
for (let i = 0; i < width; i += 25) {
if (mouseX > i && mouseX < i + w) {
fill("red");
}
rect(i, 0, w, height);
fill("white");
}
}