xxxxxxxxxx
30
let w,h;
let numCols=10;
let numRows=10;
function setup() {
createCanvas(400, 400);
w=width/numCols;
h=height/numRows;
}
function draw() {
background(220);
for(let col=0; col<numCols; col++){
for(let row=0; row<numRows; row++){
let x= col*w;
let y= row*h;
rect(x,y,w,h);
}
}
for(let x=0; x<width; x+=w){
for(let y=0; y<height; y+=h){
rect(x,y,w,h);
}
}
}