JSFiddle - React, Tailwind, and code Playground
HTML
<div></div>
JavaScript
var div = document.getElementsByTagName('div')[0];
var example = {
user : "John",
dollars: 12.57
};
setInterval(function() {
var s, final;
example.dollars += (parseInt(Math.floor(Math.random() * 2000 + 500)) / 100);
s = example.dollars + .005 + '',
final = s.substring(0, s.indexOf('.') + 3);
console.log(final);
div.innerHTML += "<br>" + final;
}, 1000);