JSFiddle - React, Tailwind, and code Playground

by taylorbuley

HTML

<canvas id="container">

CSS

#container {
    height: 400px;
    width: 600px;
}

JavaScript

var c2 = document.getElementById('container').getContext('2d');
c2.height = 400;
c2.width = 600;
c2.fillStyle = '#336699';
c2.beginPath();
c2.moveTo(0, 0);
c2.lineTo(100, 50);
c2.lineTo(50, 100);
c2.lineTo(0, 90);
c2.closePath();
c2.fill();