xxxxxxxxxx
19
let w;
let col=20;
function setup() {
createCanvas(400, 400);
w= width/col;
}
function draw() {
background(220);
for(let x=0; x<width ; x+=w){
if(mouseX>x&&mouseX<x+w){
fill("red")
} else {
fill("white");
}
rect(x,0,w,height);
}
}