<div id="num"></div> <script> var n = 234345567; +function b() { n += Math.random() * .98 + .01; num.textContent = n.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g,','); setTimeout(b, Math.random() > .2 ? 270 : 2000) }() </script>