JSFiddle - React, Tailwind, and code Playground

by satilog

HTML

<p id="num" style="color:white">asd</p>

JavaScript

var number = document.getElementById("num");

setInterval(function() {
  number.innerHTML = (Math.floor(Math.random() * 100) / 10) - 1;
  //Note the problem arises only when a value is subtracted

}, 300);