probando combinaciones :D
<canvas width="600" height="400"></canvas>
<script>
var y = 0;
var x = 0;
function dibujarCuadradoVerde(x,y){
var pantalla = document.querySelector("canvas");
var pincel = pantalla.getContext("2d");
pincel.fillStyle = "green";
pincel.fillRect(x,y,50,50);
pincel.strokeStyle = "black";
pincel.strokeRect(x,y,50,50);
}
for (var a = 0;a < 5; a = a++){
for (var b = 0; b < 5; b++){
dibujarCuadradoVerde(a*50,b*50);
}
}
</script>