User:Nan Wang/counting
<canvas id="c0" showsrc>
function draw() {
c = document.getElementById("c0"); ctx = c.getContext('2d'); // rows of streets for (r=0; r<8; r++) { ctx.save(); for (c=0; c<10; c++) { // a single housing unit ctx.strokeRect(0, 0, 10, 10); ctx.translate(10, 0); } ctx.restore(); ctx.translate(0, 30); }
} </canvas>