JSFiddle - React, Tailwind, and code Playground
HTML
<div id="price">1</div>
JavaScript
function increasePrice(i, max) {
setTimeout(function () {
$("#price").html("€" + i);
i++;
if (i <= max) {
increasePrice(i, max);
}
}, 20);
}
increasePrice(0, 200);