JSFiddle - React, Tailwind, and code Playground

HTML

<html>
<body>
    <a>text</a>
    <canvas id="canvas"></canvas>
</body>
</html>

CSS

#canvas{
    width :200px;
    height: 200px;
}

JavaScript

$() {
    var canvas = document.getElementById('canvas');
    var context = canvas.getContext('2d');

    context.strokeStyle = 'blue';
    context.lineWidth = 3;
    context.strokeText('Hello World!', x, y);

    alert(context);


}