xxxxxxxxxx
18
let rectWidth;
let rects = 10;
let colors = [];
function setup() {
createCanvas(400, 400);
background(220);
rectWidth = width/rects;
}
function draw() {
for(let x = 0; x < rectWidth * rects; x+=rectWidth){
for(let y = 0; y < rectWidth * rects; y+=rectWidth){
rect(x, y, rectWidth);
}
}
}