JSFiddle - React, Tailwind, and code Playground

by indatawetrust

HTML

<canvas width="400" height="400"></canvas>

CSS

canvas{
    background-color:#0fd;
}

JavaScript

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

c.beginPath();
c.lineCap = 'round';
c.moveTo(20,20);
c.lineTo(200,380);
c.lineWidth = 15;
c.strokeStyle = 'blue';
c.stroke();
c.beginPath();
c.moveTo(380,20);
c.lineTo(200,380);
c.lineWidth = 15;
c.strokeStyle = 'blue';
c.stroke();