var w = 10;
function setup(){
createCanvas(400,400);
}
function draw(){
for(var x = 0; x < width; x+=10){
for(y = 0; y < height; y +=10){
if((mouseX > x && mouseX < x + 10)&&(mouseY > y && mouseY < y+10)){
fill(0,10);
w= 20;
}else{
fill(255,10);
w = 10;
}
rect(x,y,w,w);
}
}
}