JSFiddle - React, Tailwind, and code Playground

HTML

<div id="first">a</div>
<div id="second">b</div>
<div id="gg1">c</div>

JavaScript

function getRandomInt() {
    return Math.floor(Math.random() * 11);
};

function refreshDiv() {
    $('#gg1').html(getRandomInt());
};

$(document).ready(function () {
    setInterval(refreshDiv, 5000);
});