xxxxxxxxxx
24
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=w*col;
let y=h*row;
if(col%2 != row%2)
fill("black")
else
fill("white")
rect(x,y,w,h)
}
}}