JSFiddle - React, Tailwind, and code Playground

by oburejin

HTML

<canvas id="mainC">
    browser isn't supported
</canvas>

JavaScript

mainC = document.getElementById("mainC");
ctx = mainC.getContext('2d');

mainC.width = 640;
mainC.height = 480;

ctx.strokeStyle = "grey";
ctx.strokeRect(15, 15, 266, 266);
ctx.strokeRect(18, 18, 260, 260);

ctx.fillStyle = "#AF5200";
ctx.fillRect(20, 20, 256, 256);
for (i = 0; i < 8; i += 2) {
    for (j = 0; j < 8; j += 2) {
        ctx.clearRect(20 + i * 32, 20 + j * 32, 32, 32);
        ctx.clearRect(20 + (i + 1) * 32, 20 + (j + 1) * 32, 32, 32);
    }
}