JSFiddle - React, Tailwind, and code Playground

by ssbiswal1987

HTML

<canvas id="myCanvas" width="300" height="150">
Browser does not support the HTML5 canvas tag.</canvas>

JavaScript

var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");


// Blue rectangle
ctx.beginPath();
ctx.lineWidth = "10";
ctx.strokeStyle = "blue";
ctx.rect(50, 50, 50, 50);
ctx.stroke();