JSFiddle - React, Tailwind, and code Playground

HTML

<html>
    <head></head>
    
    <body>
        <canvas width="400" height="400" id="board-canvas" style="border: 1px solid silver"></canvas>
    </body>
</html>

JavaScript

$(document).ready(function() {

    var canvas = document.getElementById('board-canvas');
    var context = canvas.getContext('2d');
    
    context.translate(200, 200);

    context.fillStyle = '#eeeeee';
    context.strokeStyle = '#000000';

    context.beginPath();
    context.moveTo(0, 50);
    context.lineTo(50, 50);

    context.translate(100, 100);
    context.lineTo(50, 0);

    context.stroke();
    context.fill();

});