JSFiddle - React, Tailwind, and code Playground

by Ilhom Maksadkulov

HTML

<body  onload="init()">
  <canvas id="myCanvas" width="400" height="150"></canvas>
</body>

JavaScript

function init() {
  var c = document.getElementById('myCanvas');
  var  ctx = c.getContext('2d');
      draw();
}

function draw () {
  ctx.fillStyle = '#f00';
  ctx.fillRect(30,30, 50,50);
}