JSFiddle - React, Tailwind, and code Playground

HTML

<body bgcolor="#000000">
</body>

JavaScript

var canvas = document.createElement("canvas");
canvas.width = 800;
canvas.width = 600;
var ctx = canvas.getContext("2d");
ctx.font = "30px FreeSans";

var text = "0";

document.body.appendChild(canvas);

function render() {
	ctx.clearRect(0, 0, canvas.width, canvas.height);
  draw();
	requestAnimationFrame(render);
}

function draw() {
	ctx.fillStyle = "blue";
	ctx.textAlign = "left";
	ctx.fillText(text, canvas.width / 2, canvas.height / 2);
  
  ctx.fillStyle = "red";
	ctx.textAlign = "right";
	ctx.fillText(text, canvas.width / 2, canvas.height / 2); 
}

function start() {
  text += "0";
  setTimeout(function() {
      if(text.length > 10 ){
        text = "0";
      }
  		start();
  }, 500);
}

render();
start();