JSFiddle - React, Tailwind, and code Playground

HTML

<canvas width="200" height="200">get canvas</canvas>

JavaScript

var ctx = document.getElementsByTagName('canvas')[0].getContext('2d');

ctx.beginPath();
ctx.fillStyle = "black";
ctx.arc(30, 30, 20, 0, Math.PI * 2, true);
ctx.fill();
ctx.closePath();
ctx.beginPath();
ctx.fillStyle = "red";
ctx.arc(100, 100, 40, 0, Math.PI * 2, true);
ctx.fill();
ctx.closePath();