JSFiddle - React, Tailwind, and code Playground

by tranxuanthang

HTML

<canvas id="canvas"></canvas>

JavaScript

const canvas = document.getElementById('canvas')
const ctx = canvas.getContext('2d')

/* ctx.fillStyle = 'black'
ctx.fillRect(10, 20, 50, 50) */

/* ctx.strokeStyle = 'rgb(255, 0, 0)'
ctx.rect(70, 20, 50, 100)
ctx.stroke() */

ctx.fillStyle = 'black'
ctx.font = '14px';
ctx.fillText('HAPPY NEW YEAR', 10, 140)