JSFiddle - React, Tailwind, and code Playground
by Farzad YZ
HTML
<canvas width="200" height="200"></canvas>
CSS
body {
margin: 100px;
}
JavaScript
const canvas = document.querySelector('canvas');
const ctx = canvas.getContext('2d');
console.log(ctx)
ctx.fillStyle = "#ddd";
ctx.fillRect(0, 0, 200, 200);
ctx.beginPath();
ctx.moveTo(0, 0); // Create a starting point
ctx.arcTo(200, 0, 200, 200, 200); // Create an arc
ctx.stroke(); // Draw it
class Game {
}