JSFiddle - React, Tailwind, and code Playground
by satej
HTML
<canvas width="600" height="400">
JavaScript
var canvas = document.getElementsByTagName("canvas")[0];
var context = canvas.getContext("2d");
context.beginPath();
context.moveTo(100, 150);
context.lineTo(250, 75);
context.lineTo(125, 30);
context.closePath();
context.lineWidth = 5;
context.stroke();
context.fillStyle = "red";
context.fill();