function setup(){
createCanvas(600,600);
background(400);
noStroke();
}
function draw(){
for(let x=0;x<600;x+=120){
for(let y=0;y<600;y+=120){
fill(random(255),random(255),);
rect(x,y,120,120);
}
}
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.1.9/p5.min.js"></script>