JSFiddle - React, Tailwind, and code Playground

by AntonLapshin

HTML

<span>
  Number of renders: <span id="counter"></span>  
</span>
<p>
  With this rendering frequency an estimated time to reach the Number.MAX_SAFE_INTEGER is <span id="estimated"></span> millions of years
</p>

JavaScript

const counterEl = document.querySelector('#counter');
const estimatedEl = document.querySelector('#estimated');
let i = 0;
const DELAY = 10;
estimatedEl.innerHTML = (Number.MAX_SAFE_INTEGER * DELAY / 1000 / 60 / 60 / 24 / 365 / 1000000).toFixed(3); 
window.setInterval(() => {
	counterEl.innerHTML = i++;
}, DELAY);