[Solved] Count to numbers above a billion in a few seconds without browser freezing
[ad_1] The best thing you can do is use requestAnimationFrame. This represents the fastest rate that you can update the DOM. Use the callback to update your element text to the number proportional to the time allowed; 3 seconds (a few) from your question title const runCounter = (num, timeout, el) => { let start; … Read more