xxxxxxxxxx
25
let spaceBetween = 80;
let squareX;
let squareY;
function setup() {
createCanvas(400, 320);
}
function draw() {
background("slateblue");
fill("palegreen");
noStroke();
for (let j = 1; j <= 5; j += 1) {
squareY = j * spaceBetween;
for (let i = 1; i <= 5; i += 1) {
squareX = i * spaceBetween;
square(squareX - 60, squareY - 60, 40);
}
}
noLoop();
}